Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)

CSS 'animation-duration' Property Explained

Est. Reading: 1 minute
Updated: April 1, 2024

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

FirefoxSafariChromeMicrosoft EdgeOpera
16.0
5.0 -moz-
9.0
4.0 -webkit-
43.0
4.0 -webkit-
10.030.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.

Ryan Parker

Ryan has been a standout in digital marketing since 2010. He's the go-to person for getting businesses noticed online, with over 300 projects under his belt—these range from helping local business owners to big online stores. As the Head of Digital Marketing at his company, Ryan knows all the tricks to make companies shine on the internet. He's excellent at using the latest tech and smart strategies to get results. Ryan is all about making businesses grow and reach more people online.

chevron-down