Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style animationName Property

Style animationName Property

Style Object Reference The Style object

Example

changing

The animationName property of an element:

document.getElementById("myDIV").style.animationName="myNEWmove";

Try it »


Definition and Usage

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


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10, Firefox, and Opera support the animationName property.

Safari and Chrome support an alternative to this 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"

Attribute values

Value Description
none Default. Specifies that there is no animation (can be used to override an animation from a cascade).
keyframename Specifies the name of the keyframes to bind to the selector.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default value: none
Return Value: A string representing the animation-name property of the element.
CSS version CSS3

Related Articles

CSS Reference Manual:animation-name Property


Style Object Reference The Style object