THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Style animationDelay Property

Style Object Reference Style Object

Example

Changing the animationDelay property of a <div> element:

document.getElementById("myDIV").style.animationDelay = "1s";
Try it Yourself »

Definition and Usage

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.


Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Numbers followed by Moz specify the first version that worked with a prefix.

Property
animationDelay 43.0  Not supported 16.0
5.0 Moz
Not supported 30.0

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

Related Pages

CSS reference: animation-delay property


Style Object Reference Style Object