animation-direction :
Bir animasyonun yön özelliğidir. Ters yönde veya alternatif yönde oynamasını belirler.
Örnek
div {
width: 100px;
height: 100px;
background: green;
color: white;
position: relative;
-webkit-animation: mymove 5s infinite; /* Chrome, Safari, Opera */
animation: mymove 5s infinite;
-webkit-animation-direction: alternate; /* Chrome, Safari, Opera */
animation-direction: alternate;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes mymove {
from {top: 0px;}
to {top: 200px;}
}
@keyframes mymove {
from {top: 0px;}
to {top: 200px;}
}
Codepen Ön izleme
Css Sözdizimi
| Değer | Açıklama |
| normal | Animasyonu normal şekilde oynatır. |
| reserve | Animasyonu ters yönde oynatır. |
| alternate | Animasyonu tekrar geriye doğru oynatır. Yaptığı hareketleri geriye doğru aynısı tekrarlar. |
| alternate-reserve | Animasyonu önce ters yönde başlayarak hareketlerini daha sonra geriye doğru tekrar eder. |
| İnital | |
| İnherit |
Tarayıcı Desteği
| 43.0 4.0-webkit |
16.0 5.0-moz |
10.0 | 9.0 4.0-webkit |
30.0 12.0-o 15.0-webkit |