Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS3 animation-delay property

CSS3 animation-delay property

Example

Wait two seconds, then start the animation:

animation-delay

:2

s

; -

webkit-animation-delay

:2

s

;

/*

Safari and Chrome

*/

Try it »

There are more examples at the bottom of this page.


Browser support

The numbers in the table indicate the first browser version that supports this property.

A number immediately before -webkit-, -ms-, or -moz- indicates the first browser version that supports that prefixed property.

property
animation-delay 43.0
4.0 -webkit- 10.0 16.0
5.0 -moz- 9.0
4.0 -webkit- 30.0
 15.0 -webkit-       
 12.0 -o- |

Tag Definition and Usage Notes

The animation-delay property defines when the animation starts.

The unit of the animation-delay value can be seconds (s) or milliseconds (ms).

Tip: Negative values are allowed; -2s makes the animation start immediately, but skips 2 seconds into the animation.

Default value: 0
Inherited: no
Version: CSS3
JavaScript syntax: object object.style.animationDelay="2s"

Syntax

animation-delay:

time

;

Value Description Testing
time Optional. Defines the time to wait before the animation starts, in seconds or milliseconds. The default value is 0 Test »

More examples

Example

Negative value, note that the animation skips 2 seconds into the animation cycle:

animation-delay: -2

s

/*

Opera

*/

-moz-animation-delay: -2

s

/*

Firefox

*/

-webkit-animation-delay: -2

s

/*

Safari and Chrome

*/

Try it »


Related Articles

CSS3 tutorial: CSS3 Animations