The transition-property
CSS property sets the CSS properties to which a transition effect should be applied.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Note: The set of properties that can be animated is subject to change. As such, you should avoid including any properties in the list that don't currently animate, as someday they might, causing unexpected results.
If you specify a shorthand property (e.g., background
), all of its longhand sub-properties that can be animated will be.
Syntax
/* Keyword values */ transition-property: none; transition-property: all; /* <custom-ident> values */ transition-property: test_05; transition-property: -specific; transition-property: sliding-vertically; /* Multiple values */ transition-property: test1, animation4; transition-property: all, height, color; transition-property: all, -moz-specific, sliding; /* Global values */ transition-property: inherit; transition-property: initial; transition-property: unset;
Values
none
- No properties will transition.
all
- All properties that can transition will.
<custom-ident>
- A string identifying the property to which a transition effect should be applied when its value changes.
Formal definition
Initial value | all |
---|---|
Applies to | all elements, ::before and ::after pseudo-elements |
Inherited | no |
Computed value | as specified |
Animation type | discrete |
Formal syntax
none | <single-transition-property>#where
<single-transition-property> = all | <custom-ident>
Examples
There are several examples of CSS transitions included in the main CSS transitions article.
Specifications
Specification | Status | Comment |
---|---|---|
CSS Transitions The definition of 'transition-property' in that specification. |
Working Draft | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
transition-property | Chrome
Full support
26
| Edge
Full support
12
| Firefox
Full support
16
| IE
Full support
10
| Opera
Full support
12.1
| Safari
Full support
9
| WebView Android
Full support
≤37
| Chrome Android
Full support
26
| Firefox Android
Full support
16
| Opera Android
Full support
12.1
| Safari iOS
Full support
9
| Samsung Internet Android
Full support
1.5
|
IDENT value | Chrome Full support 1 | Edge Full support 12 | Firefox Full support 16 | IE Full support 10 | Opera Full support 15 | Safari Full support 4 | WebView Android Full support ≤37 | Chrome Android Full support 18 | Firefox Android Full support 16 | Opera Android Full support 14 | Safari iOS Full support 3 | Samsung Internet Android Full support 1.0 |
Legend
- Full support
- Full support
- User must explicitly enable this feature.
- User must explicitly enable this feature.
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.