ExampleLet the transition effect last for 5 seconds:
Try it yourself » |
The transition-duration property is not supported in any browsers.
Safari and Chrome support an alternative, the -webkit-transition-duration property.
Opera support an alternative, the -o-transition-duration property.
The transition-duration property specifies how many seconds (s) or milliseconds (ms) a transition effect takes to complete.
Default value: | 0 |
---|---|
Inherited: | no |
Version: | CSS3 |
JavaScript syntax: | object.style.transitionDuration="5s" |
transition-duration: time; |
Value | Description |
---|---|
time | Specifies how many seconds or milliseconds a transition effect takes to complete. Default value is 0, meaning there will be no effect |