Estilo animationTimingFunction Propiedad
Ejemplo
Cambiar la propiedad animationTimingFunction de un elemento <div>:
document.getElementById("myDIV").style.animationTimingFunction = "linear";
Definición y uso
La animationTimingFunction especifica la curva de velocidad de la animación.
La curva de velocidad define el TIEMPO que usa una animación para cambiar de un conjunto de estilos CSS a otro.
La curva de velocidad se usa para hacer los cambios suavemente.
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Los números seguidos de Moz especifican la primera versión que funcionó con un prefijo.
Property | |||||
---|---|---|---|---|---|
animationTimingFunction | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
Sintaxis
Devuelve la propiedad animationTimingFunction:
object.style.animationTimingFunction
Establezca la propiedad animationTimingFunction:
object.style.animationTimingFunction = "linear|ease|ease-in|ease-out|cubic-bezier(n, n, n, n)|initial|inherit"
Valores de propiedad
Value | Description |
---|---|
linear | The animation has the same speed from start to end |
ease | Default value. The animation has a slow start, then fast, before it ends slowly |
ease-in | The animation has a slow start |
ease-out | The animation has a slow end |
ease-in-out | The animation has both a slow start and a slow end |
cubic-bezier(n, n, n, n) | Define your own values in the cubic-bezier function Possible values are numeric values from 0 to 1 |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detalles técnicos
Valor por defecto: | facilidad |
---|---|
Valor de retorno: | Una cadena, que representa la propiedad de función de temporización de animación de un elemento |
Versión CSS | CSS3 |
páginas relacionadas
Referencia de CSS: propiedad de la función de tiempo de animación