CSS animation-duration Property

Definition and Usage

animation-duration The property defines the time required to complete one cycle of the animation, in seconds or milliseconds.

See Also:

CSS3 Tutorial:CSS Animation

HTML DOM Reference Manual:animationDuration Property

Example

Define a name for the @keyframes animation:

div {
  animation-duration: 3s;
}

Try It Yourself

CSS Syntax

animation-duration: time;
Value Description
time Specifies the time taken to complete the animation. The default value is 0, meaning no animation effect.

Technical Details

Default Value: 0
Inheritance: no
Version: CSS3
JavaScript Syntax: object.style.animationDuration="3s"

Browser Support

The numbers in the table indicate the first browser version that fully supports the property.

Numbers with -webkit-, -moz-, or -o- prefixes indicate the first version using the prefix.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
43.0
3.0 -webkit-
10.0 16.0
5.0 -moz-
9.0
4.0 -webkit-
30.0
15.0 -webkit-
12.0 -o-