Style animationDelay Property
Example
changing
The animationDelay property of an element:
document.getElementById("myDIV").style.animationDelay="1s";
Try it »
Definition and Usage
The animationDelay property defines when the animation will start.
The unit of the animationDelay value can be seconds (s) or milliseconds (ms).
**Tip:** Negative values are allowed; -2s means the animation will start immediately, but from 2 seconds into the animation.
Browser support





Only Firefox supports the animationDelay property.
Syntax
Return the animationDelay property:
object
.style.animationDelay
Set the animationDelay property:
object
.style.animationDelay="
time
|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| time | Optional. Defines the number of seconds or milliseconds before the animation starts. The default value is 0. |
| 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-delay property of the element. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:animation-delay Property
The Style object