Stile animationTimingFunction Proprietà
Esempio
Modifica della proprietà animationTimingFunction di un elemento <div>:
document.getElementById("myDIV").style.animationTimingFunction = "linear";
Definizione e utilizzo
AnimationTimingFunction specifica la curva di velocità dell'animazione.
La curva di velocità definisce il TEMPO che un'animazione utilizza per passare da un insieme di stili CSS a un altro.
La curva di velocità viene utilizzata per apportare le modifiche senza intoppi.
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
I numeri seguiti da Moz specificano la prima versione che ha funzionato con un prefisso.
Property | |||||
---|---|---|---|---|---|
animationTimingFunction | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
Sintassi
Restituisce la proprietà animationTimingFunction:
object.style.animationTimingFunction
Imposta la proprietà animationTimingFunction:
object.style.animationTimingFunction = "linear|ease|ease-in|ease-out|cubic-bezier(n, n, n, n)|initial|inherit"
Valori di proprietà
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 |
Dettagli tecnici
Valore di default: | sollievo |
---|---|
Valore di ritorno: | Un oggetto String, che rappresenta la proprietà della funzione di temporizzazione dell'animazione di un elemento |
Versione CSS | CSS3 |
Pagine correlate
Riferimento CSS: proprietà della funzione di temporizzazione dell'animazione