Style animationName Property

Example

Changing the animationName property of a <div> element:

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

Description

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


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 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

Browser Support

animationName is a CSS3 (1999) feature.

It is fully supported in all browsers:

Chrome Edge Firefox Safari Opera IE
Yes Yes Yes Yes Yes 11

Related Pages

CSS reference: animation-name property


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.