HTML DOM Style animationName Property

Style animationName Property

❮ Style Object


Changing the animationName property of a <div> element:

// Code for Chrome, Safari, and Opera
document.getElementById("myDIV").style.WebkitAnimationName = "myNEWmove";

// Standard syntax
document.getElementById("myDIV").style.animationName = "myNEWmove";
Try it Yourself »

Definition and Usage

The animationName property sets or returns a name for the @keyframes animation.

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Numbers followed by Webkit, Moz, or O specify the first version that worked with a prefix.

animationName 43.0
4.0 Webkit
10.0 16.0
5.0 Moz
4.0 Webkit 30.0
15.0 Webkit
12.0 O

Note: Chrome, Safari and Opera support an alternative, the WebkitAnimationName property.


Return the animationName property:

Set the animationName property: = "none|keyframename|initial|inherit"

Property Values

Value Description
none Default value. Specifies that there will be no animation (can be used to override animations coming from the cascade)
keyframename Specifies the name of the keyframe you want to bind to the selector
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: none
Return Value: A String, representing the animation-name property of an element
CSS Version CSS3

Related Pages

CSS reference: animation-name property

❮ Style Object