Style animationDuration property
- Previous Page animationDirection
- Next Page animationFillMode
- Go to the Previous Level HTML DOM Style Object
Definition and usage
animationDuration
Property defines the number of seconds or milliseconds required for one cycle of the animation to complete.
Example
Change the animationDuration property of the <div> element:
document.getElementById("myDIV").style.animationDuration = "3s";
Syntax
Returns the animationDuration property:
object.style.animationDuration
Sets the animationDuration property:
object.style.animationDuration = "time|initial|inherit"
Property value
Value | Description |
---|---|
time | Specifies the length required for the animation to complete. The default value is 0, indicating no animation. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | 0 |
---|---|
Return value: | String representing the element's animation-duration Property. |
CSS version: | CSS3 |
Browser support
animationDuration
It is a CSS3 (1999) feature.
All browsers fully support it:
Chrome | Edge | Firefox | Safari | Opera | IE |
---|---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera | IE |
Support | Support | Support | Support | Support | 11 |
Related Pages
CSS Reference Manual:animation-duration Property
- Previous Page animationDirection
- Next Page animationFillMode
- Go to the Previous Level HTML DOM Style Object