خاصية اتجاهات الحركة في CSS
مثال
قم بتشغيل الرسوم المتحركة للأمام أولاً ، ثم للخلف:
div {
animation-direction: alternate;
}
المزيد من الأمثلة "جربها بنفسك" أدناه.
التعريف والاستخدام
تحدد الخاصية ما animation-direction
إذا كان يجب تشغيل الرسم المتحرك للأمام أو للخلف أو في دورات بديلة.
القيمة الافتراضية: | عادي |
---|---|
وارث: | رقم |
متحرك: | رقم. اقرأ عن animatable |
الإصدار: | CSS3 |
بناء جملة JavaScript: | الكائن .style.animationDirection = "معكوس" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
الأرقام متبوعة بـ -webkit- أو -moz- أو -o- تحدد الإصدار الأول الذي يعمل مع بادئة.
Property | |||||
---|---|---|---|---|---|
animation-direction | 43.0 4.0 -webkit- |
10.0 | 16.0 5.0 -moz- |
9.0 4.0 -webkit- |
30.0 15.0 -webkit- 12.0 -o- |
بنية CSS
animation-direction: normal|reverse|alternate|alternate-reverse|initial|inherit;
قيم الملكية
Value | Description | Play it |
---|---|---|
normal | Default value. The animation is played as normal (forwards) | |
reverse | The animation is played in reverse direction (backwards) | |
alternate | The animation is played forwards first, then backwards | |
alternate-reverse | The animation is played backwards first, then forwards | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
مزيد من الأمثلة
مثال
قم بتشغيل الرسوم المتحركة للخلف أولاً ، ثم إلى الأمام:
div {
animation-direction: alternate-reverse;
}
مثال
قم بتشغيل الرسوم المتحركة للخلف:
div {
animation-direction: reverse;
}
الصفحات ذات الصلة
مرجع DOM HTML: خاصية AnimationDirection