Our volunteers haven't translated this article into Bahasa Indonesia yet. Join us and help get the job done!
You can also read the article in English (US).

The transition-property CSS property specifies the CSS properties to which a transition effect should be applied.

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, all;
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 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
Initial valueall
Applies toall elements, ::before and ::after pseudo-elements
Inheritedno
Mediavisual
Computed valueas specified
Animation typediscrete
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support

26

Yes -webkit-

12

12 -webkit-

16

4 -moz-

49 -webkit-

44 -webkit- 1

10

12.1

15 -webkit-

11.6 — 15 -o-

Yes

Yes -webkit-

IDENT value Yes ? Yes Yes Yes No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support

Yes

Yes -webkit-

26

Yes -webkit-

12

12 -webkit-

16

4 -moz-

49 -webkit-

44 -webkit- 1

?

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.

See also

Tag Dokumen dan Kontributor

 Terakhir diperbarui oleh: wbamberg,