Wait two seconds, then start the animation:
More "Try it Yourself" examples below.
The animation-delay property defines when the animation will start.
The animation-delay 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.
Default value: | 0 |
---|---|
Inherited: | no |
Animatable: | no. Read about animatable |
Version: | CSS3 |
JavaScript syntax: | object.style.animationDelay="1s" Try it |
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -webkit-, -moz-, or -o- specify the first version that worked with a prefix.
Property | |||||
---|---|---|---|---|---|
animation-delay | 4.0 -webkit- | 10.0 | 16.0 5.0 -moz- |
4.0 -webkit- | 15.0 -webkit- 12.1 12.0 -o- |
Value | Description | Play it |
---|---|---|
time | Optional. Defines the number of seconds or milliseconds to wait before the animation will start. Default value is 0 | Play it » |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Using negative values, notice that the animation starts 2 seconds into the animation cycle:
CSS3 tutorial: CSS3 Animations
HTML DOM reference: animationDelay property