Style animationDuration Property
Example
changing
The animationDuration property of an element:
document.getElementById("myDIV").style.animationDuration="3s";
Try it »
Definition and Usage
The animationDuration property defines the number of seconds an animation takes to complete one cycle.
Browser support





Only Firefox supports the animationDuration property.
Syntax
Return the animationDuration property:
object
.style.animationDuration
Set the animationDuration property:
object
.style.animationDuration="
time
|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| time | Specifies the length of time the animation takes to complete. The default value is 0, which means there is 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: | A string representing the animation-duration property of the element. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:animation-duration Property
The Style object