AnimationEvent
Properties
属性继承其父级Event.
AnimationEvent.animationName只读-
Is a
DOMStringcontaining the value of theanimation-nameCSS property associated with the transition. AnimationEvent.elapsedTime(en-US) 只读-
Is a
floatgiving 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,elapsedTimeis0.0unless there was a negative value foranimation-delay, in which case the event will be fired withelapsedTimecontaining(-1 * delay). AnimationEvent.pseudoElement(en-US) 只读-
Is a
DOMString, starting with'::', containing the name of the pseudo-element the animation runs on. If the animation doesn't run on a pseudo-element but on the element, an empty string:''.
Constructor
AnimationEvent()-
Creates an
AnimationEventevent with the given parameters.
Methods
Also inherits methods from its parent Event.
AnimationEvent.initAnimationEvent()(en-US) 非标准 已弃用-
Initializes a
AnimationEventcreated using the deprecatedDocument.createEvent("AnimationEvent")method.
Specifications
| Specification |
|---|
| CSS Animations Level 1 # interface-animationevent |
Browser compatibility
BCD tables only load in the browser