Transition-delay - Property CSS

transition-delay

Summary of characteristics of the transition-delay property

Quick description
Sets the amount of time to wait before the transition begins, counted from the time the property is changed.
Status
Standard
Applies to
All elements.
Usable for
HTML
Percentages
Not applicable.
Initial value
0s
Inherited by default
No.
Not animable: the transition-delay property cannot be animated.
Per grammar: serialization in the order of syntax.
W3C Module
CSS Transitions
 🡇  
 🡅  
Document status: WD (Working Draft)

Document status: WD (Working Draft)

Syntax diagram of transition-delay.

Transition-delay property - Syntax diagramSyntax diagram of the transition-delay CSS property. See stylescss.free.fr for details. duration duration , ,transition-delay:;transition-delay:;
Syntax diagram of the transition-delay property.
The links in the diagram provide more details about the values.

In the diagram, the bold terms are the predefined words of CSS, the other terms are described below:

  • duration is a numeric value followed by one of CSS units of duration.
  • The syntax can be repeated several times, separated by commas.

Description of the transition-delay property.

Sets a wait time before the transition starts.

A transition consists of gradually changing a property from one value to another. The transition is triggered when a new value is assigned to the property. For a general overview of transitions, refer to the shorthand property transition.

The waiting time defined by transition-delay is added to the normal duration of the transition. It therefore does not reduce the latter. Unless transition-delay receives a negative value, in which case the animation is not played fully and it runs over a shorter duration.

Values for transition-delay.

  • transition-delay: 2s;

    The transition effect starts after the indicated duration. A positive or negative number, followed by one of CSS units of duration.

    The default value is 0: the transition starts as soon as the animated property is changed.

    If the duration is negative, the transition effect starts immediately but the first part of the transition is not animated. If this negative value is greater than the duration of the transition, the transition effect is canceled.

  • transition-delay: 2s, 1s;

    When multiple transitions have been defined, it is possible to apply different delays to them by listing the values, separated by commas.

    Refer to the page multiple transitions for more information on multiple transitions.

  • transition-delay: initial; (0s) transition-delay: inherit; transition-delay: revert; transition-delay: revertLayer; transition-delay: unset;

    See the following pages for more details: initial, inherit, revert, revert-layer, unset.

Animation of the transition-delay property.

Like all properties related to animations or transitions, transition-delay cannot be animated.

Simulator.

A 2-second transition has been set on the left margin of the blue block below. The simulator allows you to adjust the value of transition-delay. The "Start" button changes the value of the left margin, which triggers the transition.

You can try a negative duration for the wait time, but it must remain between 0 and -2s, otherwise the transition does not happen at all.

transition-delay :

Browsers compatibility with transition-delay.

Transitions and the property transition-delay are well supported by current browsers.

Column 1
General support for transitions.
Column 2
Support for the property transition-delay which defines a waiting time before the transition starts.
1
Transitions
support
2
transition-delay
property
Estimated overall support.
97%
96%

Browsers on computers :

Mobile browsers :

Outdated or marginal browsers :

Internet Explorer

QQ Browser

Safari sur IOS

Firefox pour Androïd

Opéra Mobile

Baidu Browser

KaiOS Browser

UC Browser pour Androïd

Samsung Internet

Chrome

Edge

Firefox

Androïd Brower

Chrome pour Androïd

Opéra

Safari

Opéra mini

Historic of the transition-delay property.

  • CSS Transitions - Level 1

    Normally, when a property changes of value, its display on the screen is immediate. This specification module describes how to progressively change properties from one value to another over a given time. In other words, how to gradually move from one state to another.
    However, an external event is needed to trigger the change in property values (JavaScript code, user action, etc.). In this sense, transitions differ from animations, which can run independently of any external action.

    Regarding transition-delay. First specification concerning transitions, and definition of corresponding properties.
    WD
    March 20, 2009
    Working Draft.
    CR
    PR
    REC
  • CSS Transitions - Level 2

    Level 2 of the specification on transitions adds the ability to apply a transition to a discrete property.
    A new at-rule @starting-style allows defining the starting values for property values. It is now possible to apply a transition to elements that go from the invisible state to the visible state.

    Regarding transition-delay. No change to the transition-delay property.
    WD
    September 05, 2023
    Working Draft.
    CR
    PR
    REC

Voir aussi : les transitions.

The transitions are described in the specification CSS Transitions. To facilitate your research, here are the properties related to transitions:

Properties:

transition
Group the different parameters of one or more transitions.
transition-behavior
Defines the behavior of transitions on properties whose animation type is discrete.
Transition-delay
Sets the amount of time to wait before the transition begins, counted from the time the property is changed.
transition-duration
Defines the duration of a transition, i.e. the time it takes to complete its transition.
transition-property
Defines the property(s) on which a transition should be applied.
transition-timing-function
A property that defines the easing function to be used during a transition.

At-rules:

@starting-style
Sets the initial values for properties that will be subject to a transition.