Style animationDelay property
- Previous Page animation
- Next Page animationDirection
- Go to the Previous Level HTML DOM Style Object
Definition and usage
animationDelay
Property defines when the animation starts.
animationDelay
Values are defined in seconds (s) or milliseconds (ms).
Tip:Negative values are allowed,-2s
Make the animation start immediately, but play at the 2-second mark.
Example
Change the animationDelay property of the <div> element:
document.getElementById("myDIV").style.animationDelay = "1s";
Syntax
Return the animationDelay property:
object.style.animationDelay
Set the animationDelay property:
object.style.animationDelay = "time|initial|inherit"
Property value
Value | Description |
---|---|
time | Optional. Defines the number of seconds or milliseconds to wait 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 element's animation-delay Property. |
CSS version: | CSS3 |
Browser support
animationDelay
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-delay Property
- Previous Page animation
- Next Page animationDirection
- Go to the Previous Level HTML DOM Style Object