Transition-property - Property CSS

transition-property

Summary of characteristics of the transition-property property

Quick description
Defines the property(s) on which a transition should be applied.
Status
Standard
Applies to
All elements.
Usable for
HTML
Predefined values
none | all
Percentages
Not applicable.
Initial value
all
Inherited by default
No.
Not animable: the transition-property 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-property.

transition-property - Syntax DiagramSyntax diagram of the transition-property CSS property. none none all all prop prop , ,transition-property:;transition-property:;
Syntax diagram of the transition-property 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:

  • prop is the name of a property.

Description of the transition-property property.

transition-property defines which property(ies) must be subject to a transition. The transition starts when the value of a property is set or changed. Not all CSS properties can be associated with a transition. As a general rule, it is possible to apply a transition on:

  • Properties that accept a numeric value, regardless of the unit.
  • Properties that accept a color.
  • The so-called "discrete" properties. See the page on transition-behavior for more information.

For a general presentation of transitions, refer to the shorthand property transition.

Values for transition-property.

  • transition-property: all;

    All properties will have a transition effect when their value is set or changed. However, the effect is not visible until the property transition-duration has been set to a value other than zero.

  • transition-property: none;

    No property is subject to a transition effect.

  • transition-property: width;

    The width property is subject to a transition effect.

  • transition-property: width, height;

    Multiple property names separated by commas. In this example, both the width and height properties will be subjected to a transition effect. Refer to the page on multiple transitions for more details.

    If one of the listed properties is not recognized by the browser, it is ignored, but the browser must maintain the matching with the other parameters. In the example below, the xxxx property is not recognized, but this should not shift the durations; in other words, the transition on width must still occur over 2 seconds.

    transition-property:xxxx, width; transition-duration:1s, 2s;
  • transition-property: initial; (all) transition-property: inherit; transition-property: revert; transition-property: revertLayer; transition-property: unset;

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

Animation of the transition-property property.

No animation possible for the property transition-property.

Browsers compatibility with transition-property.

Transition effects have been well supported by all browsers for quite a few years. There are no special precautions to take regarding the compatibility of the transition-property property.

However, it is important to keep in mind that not all properties can be subject to a transition. In particular, a transition cannot be applied to properties that only accept non-numeric values (text-align for example), but see transition-behavior on this subject.

Column 1
General support for transitions.
Column 2
Support by browsers for the transition shorthand property that allows you to define all the parameters of a transition in one declaration.
1
Transitions
support
2
transition-property
property
Estimated overall support.
97%
95%

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-property 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-property. First specification regarding transitions, and definition of the transition-property property.
    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-property. No change to the transition-property property.
    WD
    September 05, 2023
    Working Draft.
    CR
    PR
    REC

See also: transitions.

CSS standards are published by the W3C and organized into modules. Transitions are described in the module CSS Transitions. 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.