In this section, we will learn what the animation-duration property is and how to use it in CSS.
CSS animation-duration Property Definition and Usage
When we apply an animation to an element, the most important step that should be taken care of is to set the time length of that animation. Without it, there will be no animation at all.
Note: we are talking about those animations that are created by @keyframes at rule.
We set this time length for the animation using the CSS `animation-duration` property.
CSS animation-duration Property Syntax
CSS animation-duration Property Value
The value we set for this property is a number that declares the duration of the target animation based on seconds or milliseconds:
- ms: stands for millisecond and using this unit we can set a value for this property based on millisecond.
- s: stands for second and using this unit we can set a value for this property based on second.