Style animationName Property
Examples
Change the animationName property of the <div> element:
document.getElementById("myDIV").style.animationName="myNEWmove";
Try it Yourself »
Definition and Usage
The animationName property sets or returns the name of the @keyframes animation.
Browser Support
![]()
![]()
![]()
![]()
![]()
Internet Explorer 10, Firefox, and Opera support the animationName property.
Safari and Chrome support an alternative property, namely the WebkitAnimationName property.
Note:Internet Explorer 9 and earlier versions do not support the animationName property.
Syntax
Return the animationName property:
object.style.animationName
Set the animationName property:
object.style.animationName="none|keyframename|initial|inherit"
Property Values
| Value | Description |
|---|---|
| none | Default value. Specifies that there is no animation (can be used to override animations from the cascade). |
| keyframename | Specifies the name of the keyframe to bind to the selector. |
| initial | Sets this property to its default value. Seeinitial。 |
| inherit | Inherits this property from its parent element. Seeinherit。 |
Technical Details
| Default Value: | none |
|---|---|
| Return Value: | A string representing the element's animation-name property. |
| CSS Version | CSS3 |
Related Articles
CSS Reference Manual:The animation-name property
Other Extensions
Style Object