خاصية نمط الرسوم المتحركة
مثال
تغيير الحركة لعنصر <div> باستخدام خاصية الاختزال:
document.getElementById("myDIV").style.animation = "mynewmove 4s 2";
التعريف والاستخدام
خاصية الرسوم المتحركة هي خاصية مختصرة لستة من خصائص الرسوم المتحركة:
الرسوم
المتحركة للاسمالرسوم المتحركةالمدةالوقتالرسوم
المتحركة الوظيفةتأخير الرسوم
المتحركةالتكرارالعدد
الرسوم
المتحركةالاتجاه
ملاحظة: حدد دائمًا خاصية animationDuration ، وإلا ستكون المدة 0 ولن يتم تشغيلها مطلقًا.
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
تحدد الأرقام المتبوعة بـ Webkit أو Moz أو O الإصدار الأول الذي يعمل مع بادئة.
Property | |||||
---|---|---|---|---|---|
animation | 43.0 4.0 Webkit |
10.0 | 16.0 5.0 Moz |
9.0 4.0 Webkit |
30.0 15.0 Webkit 12.1 12.0 O |
بناء الجملة
إرجاع خاصية الرسوم المتحركة:
object.style.animation
قم بتعيين خاصية الرسوم المتحركة:
object.style.animation = "name duration timingFunction delay iterationCount direction fillMode playState"
قيم الملكية
Value | Description |
---|---|
animationName | Specifies the name of the keyframe you want to bind to the selector |
animationDuration | Specifies how many seconds or milliseconds an animation takes to complete |
animationTimingFunction | Specifies the speed curve of the animation |
animationDelay | Specifies a delay before the animation will start |
animationIterationCount | Specifies how many times an animation should be played |
animationDirection | Specifies whether or not the animation should play in reverse on alternate cycles |
animationFillMode | Specifies what values are applied by the animation outside the time it is executing |
animationPlayState | Specifies whether the animation is running or paused |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
تفاصيل تقنية
القيمة الافتراضية: | لا شيء 0 سهولة 0 1 عادي لا شيء تشغيل |
---|---|
قيمة الإرجاع: | سلسلة ، تمثل خاصية الرسوم المتحركة لعنصر |
إصدار CSS | CSS3 |
الصفحات ذات الصلة
مرجع CSS: خاصية الرسوم المتحركة