{"id":22467,"date":"2013-07-19T15:39:00","date_gmt":"2013-07-19T22:39:00","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=22467"},"modified":"2013-07-19T20:43:29","modified_gmt":"2013-07-20T03:43:29","slug":"transition-duration","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/t\/transition-duration\/","title":{"rendered":"transition-duration"},"content":{"rendered":"
The The value can be one of the following:<\/p>\n The default value for The following CodePen shows a hover effect on a box that uses a transition-duration<\/code> property, normally used as part of
transition<\/code> shorthand, is used to define the duration of a specified transition. That is, the length of time it will take for the targeted element to transition between two defined states.<\/p>\n
.example {\r\n transition-duration: 3s;\r\n}<\/code><\/pre>\n
\n
transition-duration<\/code> is
0s<\/code>, meaning that no transition will take place and the property change will take place immediately, even if the other transition-related properties are defined. The time value can be expressed as a decimal-based number for more precise timing and negative values are not allowed.<\/p>\n
transition-duration<\/code> value of
1s<\/code> to gradually change the background color:<\/p>\n
<\/code>Check out this Pen!<\/a><\/pre>\n