transition-timing-function

A propriedade CSS transition-timing-function é usada para descrever como os valores intermediários das propriedades CSS sendo afetados por um efeito de transição são calculados. Em essência isso permite você estabelecer uma curva de aceleração, para que então a velocidade da transição possa variar durante sua duração.

Essa curva de aceleração é definida usando <timing-function> (en-US) para cada propriedade a ser transicionada.

css
/* Keyword values */
transition-timing-function: ease;
transition-timing-function: ease-in;
transition-timing-function: ease-out;
transition-timing-function: ease-in-out;
transition-timing-function: linear;
transition-timing-function: step-start;
transition-timing-function: step-end;

/* Function values */
transition-timing-function: steps(4, end);
transition-timing-function: cubic-bezier(0.1, 0.7, 1, 0.1);
transition-timing-function: frames(10);

/* Multiple timing functions */
transition-timing-function: ease, step-start, cubic-bezier(0.1, 0.7, 1, 0.1);

/* Global values */
transition-timing-function: inherit;
transition-timing-function: initial;
transition-timing-function: unset;

You may specify multiple timing functions; each one will be applied to the corresponding property as specified by the transition-property (en-US) property, which acts as a master list. If there are fewer functions specified than in the master list, missing values are set to the initial value (ease). If there are more timing functions, the list is simply truncated to the right size. In both case the CSS declaration stays valid.

Initial valueease
Aplica-se aall elements, ::before and ::after pseudo-elements
Inheritednão
Computed valueas specified
Animation typeNot animatable

Syntax

Values

<timing-function>

Each <timing-function> (en-US) represents the timing function to link to the corresponding property to transition, as defined in transition-property (en-US).

Formal syntax

transition-timing-function = 
<easing-function># (en-US)

<easing-function> =
linear | (en-US)
<linear-easing-function> | (en-US)
<cubic-bezier-easing-function> | (en-US)
<step-easing-function>

<linear-easing-function> =
linear( <linear-stop-list> )

<cubic-bezier-easing-function> =
ease | (en-US)
ease-in | (en-US)
ease-out | (en-US)
ease-in-out | (en-US)
cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )

<step-easing-function> =
step-start | (en-US)
step-end | (en-US)
steps( <integer> (en-US) , <step-position>? (en-US) )

<linear-stop-list> =
[ (en-US) <linear-stop> ] (en-US)# (en-US)

<step-position> =
jump-start | (en-US)
jump-end | (en-US)
jump-none | (en-US)
jump-both | (en-US)
start | (en-US)
end

<linear-stop> =
<number> && (en-US)
<linear-stop-length>? (en-US)

<linear-stop-length> =
<percentage> (en-US){1,2} (en-US)

Examples

transition-timing-function: ease

transition-timing-function: ease-in

transition-timing-function: ease-out

transition-timing-function: ease-in-out

transition-timing-function: linear

transition-timing-function: step-start

transition-timing-function: step-end

transition-timing-function: steps(4, end)

Specifications

Specification
CSS Transitions
# transition-timing-function-property

Compatibilidade com navegadores

BCD tables only load in the browser

See also