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-timing-function

Values:

<timing-function> [, < timing-function >]*

Expansions:

<timing-function>

ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier(<number>, <number>, <number>, <number>)

Initial value:

ease

Applies to:

Block-level and inline-level elements

Inherited:

No

Computed value:

Same as declared value

Description:

Defines how an animation is run over the course of an animation’s full cycle or within an individual keyframe, depending on where the property is used. The keywords are all defined to have cubic-bezier() equivalents; for example, linear is equivalent to cubic-bezier(0,0,1,1). They should therefore have consistent effects across user agents, though, as always, authors are cautioned to avoid dependency on consistency.

Examples:

h1 {animation-timing-function: 
     ease, ease-in, cubic-bezier(0.13,0.42,0.67,0.75)}
p {animation-timing-function: linear;}

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