{"id":22477,"date":"2013-07-19T20:37:49","date_gmt":"2013-07-20T03:37:49","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=22477"},"modified":"2019-08-12T09:59:56","modified_gmt":"2019-08-12T16:59:56","slug":"transition-delay","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/t\/transition-delay\/","title":{"rendered":"transition-delay"},"content":{"rendered":"
The The value can be one of the following:<\/p>\n The default value for When a transition has a delay value that is negative, it will cause the transition to begin immediately (with no delay), however, the transition will begin partway through the process, as though it had already begun.<\/p>\n The following Pen shows a hover effect on a box that uses a \n See the Pen Now compare that to the following demo, which has a delay of \n See the Pen Notice that in the second example, only the final two-thirds of the actual transition are visible and there is no delay. The negative value removes the delay and effectively cuts into the duration.<\/p>\n For compatibility in all supporting browsers, vendor prefixes are required, with the standard syntax declared last:<\/p>\n IE10 (the first stable version of IE to support A common use case is stagging transitions:<\/p>\n \n See the Pen transition-delay<\/code> property, normally used as part of
transition<\/code> shorthand, is used to define a length of time to delay the start of a transition.<\/p>\n
.delay-me {\r\n transition-delay: 0.25s;\r\n}<\/code><\/pre>\n
\n
1.3s<\/code> or
125ms<\/code><\/li>\n
1s background-color, 350ms transform<\/code><\/li>\n<\/ul>\n
transition-delay<\/code> is
0s<\/code>, meaning that no delay will take place and the transition will start to occur immediately. The time value can be expressed as a decimal-based number for more precise timing.<\/p>\n
transition-delay<\/code> value of
2s<\/code> with a transition duration of
1s<\/code>:<\/p>\n
\n Transition delay demo<\/a> by CSS-Tricks (@css-tricks<\/a>)
\n on CodePen<\/a>.<\/span>\n<\/p>\n-1s<\/code> and a duration of
3s<\/code>:<\/p>\n
\n Negative transition delay demo<\/a> by CSS-Tricks (@css-tricks<\/a>)
\n on CodePen<\/a>.<\/span>\n<\/p>\n.example {\r\n -webkit-transition-delay: 500ms;\r\n -moz-transition-delay: 500ms;\r\n -o-transition-delay: 500ms;\r\n transition-delay: 500ms;\r\n}<\/code><\/pre>\n
transition-delay<\/code>) does not require the
-ms-<\/code> prefix.<\/p>\n
\n Staggered Animations<\/a> by Chris Coyier (@chriscoyier<\/a>)
\n on CodePen<\/a>.<\/span>\n<\/p>\nRelated Properties<\/h3>\n