AnimationTimeline

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2020.

* Some parts of this feature may have varying levels of support.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

Web 动画 APIAnimationTimeline接口表示动画的时间轴。这个接口用于定义时间轴功能(被文档时间线和未来的时间轴类型所继承),但本身并不能被开发人员直接使用。无论何处当你要用AnimationTimeline,都应该使用DocumentTimeline或其他时间轴类型来实例化。

属性

AnimationTimeline.currentTime 只读

返回此时间轴的时间值(以毫秒为单位),若此时间轴未激活则返回null

规格

Specification
Web Animations
# the-animationtimeline-interface

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
AnimationTimeline
currentTime
duration
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

参见