Latest web development tutorials

HTML DOM Style animationName property

Style Object Reference Style Objects

Examples

Change the <div> element animationName attributes:

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

try it"

Definition and Usage

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


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10, Firefox and Opera support animationName property.

Safari and Chrome support another alternative of the property attribute that WebkitAnimationName property.

Note: Internet Explorer 9 and earlier versions do not support animationName property.


grammar

Back animationName properties:

object .style.animationName

Setting animationName properties:

object .style.animationName="none|keyframename|initial|inherit"

Property Value

描述
none 默认值。规定没有动画(可用于重写来自级联的动画)。
keyframename 规定要绑定到选择器的关键帧的名称。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

technical details

Defaults: none
return value: String representing the animation-name attribute of the element.
CSS version CSS3


related articles

CSS Reference Manual: Animation-name attribute


Style Object Reference Style Objects