Style transitionDuration property
- Forrige side transitionProperty
- Næste side transitionTimingFunction
- Gå tilbage til forrige niveau HTML DOM Style objekt
Definition and usage
transitionDuration
Property sets or returns how many seconds (s) or milliseconds (ms) it takes to complete the transition effect.
See also:
CSS reference manual:transition-duration property
Example
Accelerate transition effect:
document.getElementById("myDIV").style.transitionDuration = "1s";
Syntax
Return transitionDuration property:
object.style.transitionDuration
Set transitionDuration property:
object.style.transitionDuration = "time|initial|inherit"
Property value
Value | Description |
---|---|
time | Specify how many seconds or milliseconds it takes to complete the transition effect. The default value is 0, indicating no effect. |
initial | Set this property to its default value. See initial. |
inherit | Inherit this property from its parent element. See inherit. |
Technical details
Default value: | 0 |
---|---|
Return value: | A string that represents the element's transition-duration property. |
CSS version: | CSS3 |
Browser support
Table numbers indicate the first browser version to fully support this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
26.0 | 10.0 | 16.0 | 6.1 | 12.1 |
- Forrige side transitionProperty
- Næste side transitionTimingFunction
- Gå tilbage til forrige niveau HTML DOM Style objekt