Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS3 animation-delay property


May 05, 2021 CSS Reference Manual


Table of contents


Definitions and usages

The animation-delay property defines when the animation starts.

The animation-delay value can be in seconds (s) or milliseconds (ms).

Tip: Allow negative values, -2s to make the animation start immediately, but skip 2 seconds to enter the animation.

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


Grammar

animation-delay: time;
Value Describe Test
time Optional. D efines the time, in seconds or milliseconds, to wait before the animation begins. The default is 0 Testing . . .

Wait two seconds, and then start the animation:

animation-delay: 2 s;-webkit-animation-delay: 2 s; / * Safari and Chrome * /

Try it out . . .

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 out . . .

Browser support

CSS3 animation-delay property CSS3 animation-delay property CSS3 animation-delay property CSS3 animation-delay property CSS3 animation-delay property
animation-delay 4.0 -webkit- 10.0 16.0 (5.0 -moz-) 4.0 -webkit- 15.0 -webkit- (12.0 -o-)


Related articles

CSS3 tutorial: CSS3 animation