Styl animace Vlastnost Direction
Příklad
Změna vlastnosti animationDirection prvku <div>:
document.getElementById("myDIV").style.animationDirection = "reverse";
Definice a použití
Vlastnost animationDirection nastavuje nebo vrací, zda se má animace přehrávat obráceně v alternativních cyklech.
Poznámka: Pokud je animace nastavena na přehrávání pouze jednou, tato vlastnost nebude mít žádný vliv.
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Čísla následovaná Mozem určují první verzi, která pracovala s předponou.
Property | |||||
---|---|---|---|---|---|
animationDirection | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
Syntax
Vraťte vlastnost animationDirection:
object.style.animationDirection
Nastavte vlastnost animationDirection:
object.style.animationDirection = "normal|reverse|alternate|alternate-reverse|initial|inherit"
Hodnoty vlastností
Value | Description |
---|---|
normal | Default value. The animation should be played as normal |
reverse | The animation should play in reverse direction |
alternate | The animation will be played as normal every odd time (1,3,5,etc..) and in reverse direction every even time (2,4,6,etc...) |
alternate-reverse | The animation will be played in reverse direction every odd time (1,3,5,etc..) and in a normal direction every even time (2,4,6,etc...) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Technické údaje
Výchozí hodnota: | normální |
---|---|
Návratová hodnota: | Řetězec představující vlastnost animace-směr prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost animation-direction