O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

transition-property

Values:

none | all | [ <IDENT> ] [ ',’ <IDENT> ]*

Initial value:

all

Applies to:

All elements plus the ::before and ::after pseudo-elements

Inherited:

No

Computed value:

Same as declared value

Description:

Defines one or more properties that are transitioned from one state to another; for example, color means that the foreground color of an element is transitioned from the start color to the finish color. If a shorthand property is declared, the transition parameters meant for that property are propagated to all the properties represented by the shorthand.

The keyword all means all properties are transitioned. The keyword none prevents any properties from being transitioned, effectively shutting down the transition.

Examples:

a[href]:hover {transition-property: color;}
h1 {transition-property: all;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required