Style animationDelay Property
Example
Changing the animationDelay property of a <div> element:
document.getElementById("myDIV").style.animationDelay = "1s";
Try it Yourself »
Description
The animationDelay property defines when the animation will start.
The animationDelay value is defined in seconds (s) or milliseconds (ms).
Tip: Negative values are allowed, -2s makes the animation start at once, but starts 2 seconds into the animation.
Syntax
Return the animationDelay property:
object.style.animationDelay
Set the animationDelay property:
object.style.animationDelay = "time|initial|inherit"
Property Values
Value | Description |
---|---|
time | Optional. Defines the number of seconds or milliseconds to wait before the animation will start. Default value is 0 |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Technical Details
Default Value: | 0 |
---|---|
Return Value: | A String, representing the animation-delay property of an element |
CSS Version | CSS3 |
Browser Support
animationDelay
is a CSS3 (1999) feature.
It is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
Related Pages
CSS reference: animation-delay property
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.