Example
Specify that the animation should complete one cycle in 3 seconds:
div {
animation-duration: 3s;
}
Definition and Usage
The animation-duration property defines how long an animation should take to complete one cycle.
| Default value: | 0 |
|---|---|
| Inherited: | no |
| Animatable: | no. Read about animatable |
| Version: | CSS3 |
| JavaScript syntax: | object.style.animationDuration=”3s”Try it |
CSS Syntax
animation-duration: time|initial|inherit;
Property Values
| Value | Description | Code |
|---|---|---|
| time | Specifies the length of time an animation should take to complete one cycle. This can be specified in seconds or milliseconds. Default value is 0, which means that no animation will occur | #myDIV { animation-duration:1s; } |
| initial | Sets this property to its default value. Read about initial | |
| inherit | Inherits this property from its parent element. Read about inherit |
