animation-timing-function

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.

Experimental: Esta es una tecnología experimental
Comprueba la Tabla de compabilidad de navegadores cuidadosamente antes de usarla en producción.

Resumen

La propiedad CSS animation-timing-function especifica cómo una animación CSS debe avanzar sobre la duración de cada ciclo. Los posibles valores son una o varias .

Para animaciones con keyframes, la timing function se aplica entre los keyframes en lugar de sobre toda la animación. Es decir, se aplica al comienzo del keyframe y al final del mismo.

Una timing function definida dentro de un keyframe afecta a ese keyframe. Si no está definida para el keyframe, se aplica la timing function para la animación en general.

A menudo, es conveniente usar la propiedad abreviada animation para ajustar las propiedades de animación una sola vez.

Valor inicialease
Applies totodos los elementos y los pseudoelementos ::before y ::after
Heredableno
Valor calculadocomo se especifica
Animation typeNot animatable

Sintaxis

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

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

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

/* Global values */
animation-timing-function: inherited;
animation-timing-function: initial;
animation-timing-function: unset;

Valores

Cada representa la timing function vinculada a la propiedad correspondiente a animar, como se define en animación-propiedad.

Sintaxis formal

animation-timing-function = 
#

=
|
|


=
linear |


=
ease |
ease-in |
ease-out |
ease-in-out |


=
step-start |
step-end |


=
linear( [ && {0,2} ]# )

=
cubic-bezier( [ , ]#{2} )

=
steps( , ? )

=
jump-start |
jump-end |
jump-none |
jump-both |
start |
end

Ejemplos

Visita animaciones CSS para ver algunos ejemplos.

Especificaciones

Specification
CSS Animations Level 1
# animation-timing-function
CSS Easing Functions Level 1
# linear-easing-function-parsin

Compatibilidad con navegadores

Consulte también