CSS transition-duration Property

Description

The transition-duration property defines the length of time that a transition takes.

Initial value
0s
Applies to
All elements, :before and :after pseudo elements
Inherited
No
Media
Interactive
Computed value
Same as specified value
Animatable
No
CSS Version
CSS3
JavaScript syntax
object.style.transitionDuration

Syntax

Formal syntax: <time> [, <time>]* 

transition-duration: <time>;

Values

  • <time>The amount of time the transition from the old value of a property to the new value should take. A time of 0s indicates that no transition will happen, that is the switch between the two states will be instantaneous. A negative value for the time renders the declaration invalid.

Example

.class {
   transition-duration:10s;
}

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
??????
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
??????