The CSS ‘animation-duration’ property specifies the length of time an animation takes to complete one cycle. It determines how long an animation should run from start to finish, thereby controlling its speed. A shorter duration makes the animation faster, while a longer duration slows it down.
CSS ‘animation-duration’ Property Examples
See the Pen CSS ‘animation-duration’ Property by Webzstore (@webzstore) on CodePen.
The ‘animation-duration‘ property is a fundamental aspect of CSS animations, enabling developers to fine-tune how long animations last to achieve the desired effect. Whether aiming for subtle, quick transitions or more pronounced, slower movements, adjusting the animation duration is key to creating engaging and appropriate animations for your web content.
Browser Support For ‘animation-duration’ Property
![]() | ![]() | ![]() | ![]() | ![]() |
| 16.0 5.0 -moz- | 9.0 4.0 -webkit- | 43.0 4.0 -webkit- | 10.0 | 30.0 15.0 -webkit- 12.0 -o- |
CSS Syntax of the ‘animation-duration’ Property
animation-delay: time;
Usage of the ‘animation-duration’ Property
Use ‘animation-duration’ whenever you want to define how long an animation should last. Timing animations to match the desired feel and pacing of your website or application is essential. This property is crucial in ensuring animations contribute positively to the user experience by ensuring they are neither too quick to be missed nor too slow to cause delay.
Property Values of the ‘animation-duration’ Property
- Time: The duration of the animation cycle, specified in seconds (s) or milliseconds (ms). The value must be a positive number, with 0s (0 seconds) being the default value, which means the animation will not play since it has no duration.






Leave a Reply