UGURUS offers elite coaching and mentorship for agency owners looking to grow. Start with the free Agency Accelerator today.
transition-delay property, normally used as part of
transition shorthand, is used to define a length of time to delay the start of a transition.
The value can be one of the following:
- A valid time value defined in seconds or milliseconds e.g.
- A comma-separated list of time values, for defining separate delay values on multiple transitions for a single element e.g.
1s background-color, 350ms transform
The default value for
0s, meaning that no delay will take place and the transition will start to occur immediately. The time value can be expressed as a decimal-based number for more precise timing.
When a transition has a delay value that is negative, it will cause the transition to begin immediately (with no delay), however, the transition will begin partway through the process, as though it had already begun.
The following Pen shows a hover effect on a box that uses a
transition-delay value of
2s with a transition duration of
Now compare that to the following demo, which has a delay of
-1s and a duration of
Notice that in the second example, only the final two-thirds of the actual transition are visible and there is no delay. The negative value removes the delay and effectively cuts into the duration.
For compatibility in all supporting browsers, vendor prefixes are required, with the standard syntax declared last:
IE10 (the first stable version of IE to support
transition-delay) does not require the
A common use case is stagging transitions:
- transition-delay on W3C
- transition-delay on MDN
- Maintaining CSS Style States using “Infinite” Transition Delays
This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.
Mobile / Tablet