AnimationEffect

Baseline 已广泛支持

此功能已经成熟,并可在许多设备和浏览器版本上使用。自 ⁨2020 年 3 月⁩起,它已在各浏览器中推出。

AnimationEffect 接口是 Web Animations API 中的一个接口,表示动画效果。

AnimationEffect 是一个抽象接口,因此不能直接实例化。然而,像 KeyframeEffect 这样的具体接口继承自它,并且这些接口的实例可以传递给 Animation 对象进行播放,也可以用于 CSS 动画CSS 过渡

实例方法

AnimationEffect.getTiming()

返回与动画关联的对象,其中包含动画的所有计时值。

AnimationEffect.getComputedTiming()

返回此 AnimationEffect 的计算计时属性。

AnimationEffect.updateTiming()

更新此 AnimationEffect 的指定计时属性。

规范

规范
Web 动画
# the-animationeffect-interface

浏览器兼容性

另见