The transition-propertyCSS property is used to specify the names of CSS properties to which a transition effect should be applied.
/* Keyword values */ transition-property: none; transition-property: all; transition-property: test_05; transition-property: -specific; transition-property: sliding-vertically; transition-property: test1; transition-property: test1, animation4; transition-property: all, height, all; transition-property: all, -moz-specific, sliding; /* Global values */ transition-property: inherit; transition-property: initial; transition-property: unset;
If you specify a shorthand property (for example, background) all of its longhand sub-properties that can be animated will be.
| Initial value | all |
|---|---|
| Applies to | all elements, ::before and ::after pseudo-elements
|
| Inherited | no |
| Media | visual |
| Computed value | as specified |
| Animation type | discrete |
| Canonical order | the unique non-ambiguous order defined by the formal grammar |
noneallIDENTa to z, numbers 0 to 9, an underscore (_) or a dash(-). The first non-dash character must be a letter (that is: no number at the beginning of it, even preceded by a dash). Also, two dashes are forbidden at the beginning of the identifier.none | <single-transition-property>#where
<single-transition-property> = all | <custom-ident>
There are several examples of CSS transitions included in the main CSS transitions article.
| Specification | Status | Comment |
|---|---|---|
| CSS Transitions The definition of 'transition-property' in that specification. | Working Draft | Initial definition |
| Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support |
26 Yes -webkit- |
12 12 -webkit- |
16 4 -moz- 49 -webkit- |
10 |
12.1 15 -webkit- 11.6 — 15 -o- |
Yes Yes -webkit- |
IDENT value |
Yes | ? | Yes | Yes | Yes | No |
| Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
|---|---|---|---|---|---|---|---|
| Basic support |
Yes Yes -webkit- |
26 Yes -webkit- |
12 12 -webkit- |
16 4 -moz- 49 -webkit- |
? | ? |
Yes Yes -webkit- |
IDENT value |
Yes | Yes | ? | Yes | ? | Yes | No |
1. From version 44: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true). To change preferences in Firefox, visit about:config.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/transition-property