Latest web development tutorials

HTML DOM Style animationDuration property

Style Object Reference Style Objects

Examples

Change the <div> element animationDuration attributes:

document.getElementById("myDIV").style.animationDuration="3s";

try it"

Definition and Usage

animationDuration attribute defines the number of seconds to complete a cycle of animation it takes.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Only Firefox supports animationDuration property.


grammar

Back animationDuration properties:

object .style.animationDuration

Setting animationDuration properties:

object .style.animationDuration="time|initial|inherit"

Property Value

描述
time 规定动画完成的长度。默认值为 0,意味着没有动画。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

technical details

Defaults: 0
return value: String representing the animation-duration property element.
CSS version CSS3


related articles

CSS Reference Manual: Animation-DURATION property


Style Object Reference Style Objects