animation-duration

« CSS « CSS Reference

This is an experimental feature
Because this feature is still in development in some browsers, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental feature is subject to change in future version of browsers as the spec changes.

Summary

The animation-duration CSS property specifies the length of time that an animation should take to complete one cycle.

A value of 0s, which is the default value, indicates that no animation should occur.

It is often convenient to use the shorthand property animation to set all animation properties at once.

Syntax

animation-duration: <time> [, <time>]*

Values

<time>
The duration that an animation should take to complete one cycle. This may be specified in either seconds (by specifying "s" as the unit) or milliseconds (by specifying "ms" as the unit). If you don't specify a unit, seconds are assumed.
Note: Negative values are treated as 0.

Examples

See CSS animations for examples.

Specifications

Specification Status Comment
CSS Animations Level 3 Working Draft  

Browser compatibility

  • Desktop
  • Mobile

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 3.0 -webkit 5.0 (5.0) -moz 10 -ms [1] 12 -o 4.0 -webkit
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 2.0 -webkit 5.0 (5.0) -moz -- -- 4.2 -webkit

Tags (4)

Edit tags

Attachments (0)

 

Attach file