三文鱼和什么不能一起吃
Limited availability
百度 在过去的日子里,像暴雪、拳头、Epic等游戏大厂都曾试图在各自的地盘独立对抗恶劣游戏行为,然而结果并不尽人意。
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The skipTransition()
method of the
ViewTransition
interface skips the animation part of the view transition, but doesn't skip running the associated view update.
Syntax
js
skipTransition()
Parameters
None.
Return value
undefined
.
Examples
Skipping an SPA view transition
js
// start new view transition
const transition = document.startViewTransition(() => displayNewImage());
// skip the animation and just update the DOM
transition.skipTransition();
Skipping an MPA view transition
js
// Fired on the current (outgoing) page
document.addEventListener("pageswap", (event) => {
event.viewTransition?.skipTransition();
});
// Fired on the destination (inbound) page
document.addEventListener("pagereveal", (event) => {
event.viewTransition?.skipTransition();
});
Specifications
Specification |
---|
CSS View Transitions Module Level 1 # dom-viewtransition-skiptransition |