Style animationDelay Property

Style 对象参考手册Style Object

Examples

Change the animationDelay property of the <div> element:

document.getElementById("myDIV").style.animationDelay="1s";

Try it Yourself »

Definition and Usage

The animationDelay property defines when the animation starts.

The value of animationDelay can be in seconds (s) or milliseconds (ms).

Tip:Negative values are allowed; -2s means the animation starts immediately, but plays from 2 seconds into the animation.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Only Firefox supports the animationDelay property.


Syntax

Return the animationDelay property:

object.style.animationDelay

Set the animationDelay property:

object.style.animationDelay="time|initial|inherit"

Property Values

Value Description
time Optional. Specifies the number of seconds or milliseconds to wait before the animation starts. Default value is 0.
initial Sets this property to its default value. Seeinitial。
inherit Inherits this property from its parent element. Seeinherit。

Technical Details

Default value: 0
Return value: A string representing the animation-delay property of an element.
CSS Version CSS3


Related Articles

CSS Reference:animation-delay property


Style 对象参考手册Style Object

Other Extensions