--- title: animation-direction slug: Web/CSS/animation-direction translation_of: Web/CSS/animation-direction ---
CSS-свойство animation-direction
определяет, должна ли анимация воспроизводиться вперед, назад или переменно вперед и назад.
Также удобно использовать сокращенное свойство {{cssxref("animation")}}, чтобы одновременно установить все свойства анимации.
{{cssinfo}}
/* Одиночная анимация */ animation-direction: normal; animation-direction: reverse; animation-direction: alternate; animation-direction: alternate-reverse; /* Несколько анимаций */ animation-direction: normal, reverse; animation-direction: alternate, reverse, normal; /* Глобальные значения */ animation-direction: inherit; animation-direction: initial; animation-direction: unset;
normal
reverse
alternate
animation-iteration-count
.alternate-reverse
animation-iteration-count
.Смотрите примеры CSS анимаций.
Спецификация | Статус | Комментарий |
---|---|---|
{{SpecName('CSS3 Animations', '#animation-direction', 'animation-direction')}} | {{Spec2('CSS3 Animations')}} | Начальное определение |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}}{{property_prefix("-webkit")}} | {{CompatGeckoDesktop("5.0")}}{{property_prefix("-moz")}} {{CompatGeckoDesktop("16.0")}} |
10 | 12{{property_prefix("-o")}} 12.50 |
4.0{{property_prefix("-webkit")}} |
reverse |
19 | {{CompatGeckoDesktop("16.0")}} | 10 | {{CompatNo}} | {{CompatNo}} |
alternate-reverse |
19 | {{CompatGeckoDesktop("16.0")}} | 10 | {{CompatNo}} | {{CompatNo}} |
Unprefixed | {{CompatChrome(43.0)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatGeckoMobile("5.0")}}{{property_prefix("-moz")}} {{CompatGeckoMobile("16.0")}} |
{{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatVersionUnknown}}{{property_prefix("-webkit")}} |
reverse |
{{CompatNo}} | {{CompatUnknown}} | {{CompatGeckoMobile("16.0")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatVersionUnknown}}{{property_prefix("-webkit")}} |
alternate-reverse |
{{CompatUnknown}} | {{CompatUnknown}} | {{CompatGeckoMobile("16.0")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatVersionUnknown}}{{property_prefix("-webkit")}} |
Без префиксов | {{CompatNo}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatChrome(43.0)}} |