We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE




AnimationEvent 接口表示提供与动画相关的信息的事件。



AnimationEvent.animationName 只读
Is a DOMString containing the value of the animation-name CSS property associated with the transition.
AnimationEvent.elapsedTime 只读
Is a float giving 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, elapsedTime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedTime containing  (-1 * delay).
AnimationEvent.pseudoElement 只读
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: ''.


Creates an AnimationEvent event with the given parameters.


Also inherits methods from its parent Event.

Initializes a AnimationEvent created using the deprecated Document.createEvent("AnimationEvent") method.


Specification Status Comment
CSS Animations
Working Draft Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 webkit 6.0 (6.0) 10.0 12 o
12.10 (without prefix)
15.0 webkit
4.0 webkit
AnimationEvent() constructor 未实现 23.0 (23.0) 未实现 未实现 未实现
initAnimationEvent() 1.0 6.0 (6.0)
Removed in 23.0 (23.0)
10.0 12 4.0
pseudoelement 未实现 23.0 (23.0) 未实现 未实现 未实现
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes)webkit 6.0 (6.0) 10.0 12 o
12.10 (without prefix)
15.0 webkit
AnimationEvent() constructor 未实现 23.0 (23.0) 未实现 未实现 未实现
initAnimationEvent() (Yes) 6.0 (6.0)
Removed in 23.0 (23.0)
10.0 (Yes) (Yes)
pseudoelement 未实现 23.0 (23.0) 未实现 未实现 未实现

See also


 此页面的贡献者: luneice, xgqfrms-GitHub, zmrzwj, teoli, zmh_w
 最后编辑者: luneice,