O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

animation

Values:

[<animation-parameters>] [, [<animation-parameters>] ]*

Expansions:

<animation-parameters>

<'animation-name'> || <'animation-duration'> || <'animation-timing-function'> || <'animation-delay'> || <'animation-iteration-count'> || <'animation-direction'>

Initial value:

Refer to individual properties

Applies to:

Block-level and inline-level elements

Inherited:

No

Computed value:

Same as declared value

Description:

A shorthand property encompassing all the aspects of one or more comma-separated CSS animations. The parts of the value can occur in any order. As a result, beware possible ambiguity in the delay and duration values. As of this writing, it is most likely that the first time value will be taken to define the duration and the second to define the delay, but this cannot be guaranteed.

Examples:

div#slide {animation: 'slide' 2.5s linear 0 1 normal;}
h1 {animation: 'bounce' 0.5s 0.33s 
     ease-in-out infinite alternate;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required