animationstart
事件在 CSS 动画已经开始时被触发。 如果有 animation-delay
,事件将在延迟时效过期之后立即触发。 如果延迟时效是负值,事件触发时将带有等于延迟时效绝对值的 elapsedTime
。
基本信息
- 规格
- CSS Animations
- 接口
- AnimationEvent
- 冒泡
- 是
- 可取消
- 否
- 目标
- Document, Element
- 默认操作
- 无
属性
Property | Type | Description |
---|---|---|
target 只读 |
EventTarget |
The event target (the topmost target in the DOM tree). |
type 只读 |
DOMString |
The type of event. |
bubbles 只读 |
boolean |
Does the event normally bubble? |
cancelable 只读 |
boolean |
Is it possible to cancel the event? |
animationName 只读 |
DOMString |
The name of the CSS property associated with the transition. |
elapsedTime 只读 |
Float | The amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused. For an "animationstart" event, the elapsedTime is zero unless there was a negative value for animation-delay , in which case the event will be fired with an elapsedTime of (-1 * delay). |