CSS transition-duration property

Description

CSS transition-duration defines the time duration for a value change to occur as a result of some user event such as :hover, :active, and :link.


Negative values are not allowed. In the following demo, the transition occurs within a specific duration (transform property change occurs).

Syntax

animation-duration : time

Property values

+ve value (seconds)Default

It determnines the duration of transition. transition occurs instantly for 0s.

transition-duration: 0s;

+ve value (seconds)

transition-duration also accepts fractional values. Change in the property value occurs within 2.5s.

transition-duration: 2.5s;

+ve value (milliseconds)

time in milliseconds may also be used as the value. 2000ms means 2s.

transition-duration: 2000ms;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 
We are observing the transition-duration.
×

Ctrl+D