浏览器是否原生支持Web Animations API
支持 |不支持
- Element.animate()支持
- 第一个参数支持数组关键帧类似这样: [
{opacity: 1},
{opacity: 0} ]
- 第一个参数作为对象,且属性值是数组,类似这样:{ opacity: [1, 0] }
- 单个keyframe (案例)
- id
- play()
- pause()
- reverse()
- cancel()
- finish()
- playState
- playbackRate
- pending
- currentTime/startTime
- timeline
- oncancel handler
- onfinish handler
- finished Promise
- ready Promise
- effect (亦可见KeyframeEffect constructor)
- getComputedTiming()
- getKeyframes()
- setKeyframes()
- Element.getAnimations()
- KeyframeEffect constructor
- set duration
- set fill
- set direction
- set iterations
- set iterationStart
- set delay
- set endDelay
- set easing
- set composite
- set iterationComposite
- Animation constructor
- Document default timeline
- document.getAnimations()
- includes CSS Animations*
- includes CSS Transitions*
- DocumentTimeline constructor
更新状态:Firefox, Chrome/Opera, Edge, Safari