animation-duration

Specifies how long it takes for an animation to complete one full cycle (from 0% to 100%). Use seconds (s) or milliseconds (ms).

It is documented as part of the CSS Animations specification.

/* Usage Example */
.spinner {
  animation-name: spin;
  /* Completes one rotation every 0.8 seconds */
  animation-duration: 0.8s;
  animation-iteration-count: infinite;
}

/* Syntax */
animation-duration: auto;
animation-duration: time;

/* Global values */
animation-duration: inherit;
animation-duration: initial;
animation-duration: revert;
animation-duration: revert-layer;
animation-duration: unset;
Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

43+
16+
9+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC