asp.net.ph

Skip Navigation LinksAbakada: Back to Basics > Language References > CSS Properties > Animation Properties > animation-delay Property

animation-delay | animationDelay Property


Sets or retrieves the start delay of the associated animation effect.

Syntax

CSS { animation-delay: time }
Script object.style.animationDelay = time

Possible Values

Parameter Description Valid Values
time Sets the length of time before an animation starts. floating point number representing a time value expressed as seconds (s) or milliseconds (ms)

The property is read/write with a default value of 0s; this attribute is not inherited.

Remarks

The animation-delay property defines when the animation will start.

animation-delay is specified as a time offset, that allows an animation to begin execution some time after it is applied, or to appear to have begun execution some time before it is applied.

A positive value indicates that the animation should begin after the specified amount of time has elapsed.

A negative value causes the animation to begin immediately, but is automatically progressed by the absolute value of the delay, meaning the animation will start partway through its cycle at the offset of the inverse value.

A value of 0s is implied when no delay is specified.

NOTE: While the separate animation properties can be set individually, the shorthand animation property offers a convenient option to set all animation properties at once.

Example

The following examples demonstrate the effect of applying the animation-delay property.

Basic Animation: Text and Image Bounce
Run Sample | View Source
Basic Animation: Image Crossfade
Run Sample | View Source
Basic Animation: Zoom Swap Images
Run Sample | View Source

The following examples demonstrate use of animation-delay in multi-image scenarios.

Basic Animation: Multi-Image Fade-In-Out
Run Sample | View Source
Basic Animation: Multi-Image Dissolve
Run Sample | View Source

For a brief overview, please see Understanding and Using CSS Animations.

See Also

animation, animation-composition, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timeline, animation-timing-function


Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note