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-duration

Values:

<time> [, <time>]*

Initial value:

0

Applies to:

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

Inherited:

No

Computed value:

Same as declared value

Description:

Defines the length of time it takes for the transition to run from start to finish. The default 0 means the transition is instantaneous and no animation occurs. Negative time values are treated as 0.

Examples:

a[href]:hover {transition-duration: 1s;}
h1 {transition-duration: 10s;}

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