CSS transition-duration property
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).
animation-duration : time
+ve value (seconds)Default
It determnines the duration of transition. transition occurs instantly for 0s.
+ve value (seconds)
transition-duration also accepts fractional values. Change in the property value occurs within 2.5s.
+ve value (milliseconds)
time in milliseconds may also be used as the value. 2000ms means 2s.
It applies to all elements
Was this article helpful?