Wait 2 seconds before the transition effect starts:
document.getElementById("myDIV").style.transitionDelay = "2s";
Try it Yourself »
The transitionDelay property specifies when the transition effect will start.
The transitionDelay value is defined in seconds (s) or milliseconds (ms).
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
transitionDelay | 26.0 | 10.0 | 16.0 | 6.1 | 12.1 |
Return the transitionDelay property:
object.style.transitionDelay
Set the transitionDelay property:
object.style.transitionDelay
= "time|initial|inherit"
Value | Description |
---|---|
time | Specifies the number of seconds or milliseconds to wait before the transition effect will start |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | 0 |
---|---|
Return Value: | A String, representing the transition-delay property of an element |
CSS Version | CSS3 |
CSS reference: transition-delay property
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!