YouTip LogoYouTip

Prop Style Animationname

HTML DOM Style animationName Property

HTML DOM Style animationName Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

Style Object Reference Style Object

Style animationName Property

Example

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

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

Safari and Chrome support an alternative property for this property, which is 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 no animation (can be used to override an animation from the cascade).
keyframename Specifies the name of the keyframe to be bound 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: animation-name Property


Style Object Reference Style Object

← Prop Style AnimationtimingfuncProp Style Animationiterationc β†’