Wait 2 seconds before the transition begins:
div { transition-delay: 2s; -moz-transition-delay: 2s; /* Firefox 4 */ -webkit-transition-delay: 2s; /* Safari 和 Chrome */ -o-transition-delay: 2s; /* Opera */ }
Browser support
Ie | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|
Internet Explorer 10, Firefox, Opera, and Chrome support transition-delay properties.
Safari supports the alternative -webkit-transition-delay property.
Note: The transition-delay property is not supported by Internet Explorer 9 and earlier browsers.
Definitions and usages
The transition-delay property specifies when the transition effect begins.
The transition-delay value is measured in seconds or milliseconds.
Default: | 0 |
---|---|
Inheritance: | no |
Version: | CSS3 |
JavaScript syntax: | object .style.transitionDelay="2s" |
Grammar
transition-delay: time;
Value | Describe |
---|---|
time | Specify the time, in seconds or milliseconds, to wait before the transition effect begins. |