خاصية الرسوم المتحركة CSS
مثال
ربط رسم متحرك بعنصر <div> ، باستخدام خاصية الاختزال:
div
{
animation: mymove 5s infinite;
}
التعريف والاستخدام
الخاصية هي animation
خاصية مختصرة من أجل:
- اسم الرسوم المتحركة
- مدة الرسوم المتحركة
- الرسوم المتحركة توقيت وظيفة
- تأخير الرسوم المتحركة
- الرسوم المتحركة-التكرار-العد
- اتجاه الرسوم المتحركة
- وضع تعبئة الرسوم المتحركة
- حالة تشغيل الرسوم المتحركة
ملاحظة: حدد دائمًا خاصية مدة الرسوم المتحركة ، وإلا ستكون المدة 0 ولن يتم تشغيلها مطلقًا.
القيمة الافتراضية: | لا شيء 0 سهولة 0 1 عادي لا شيء تشغيل |
---|---|
وارث: | رقم |
متحرك: | رقم. اقرأ عن animatable |
الإصدار: | CSS3 |
بناء جملة JavaScript: | الكائن .style.animation = "mymove 5s infinite" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
الأرقام متبوعة بـ -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.0 -o- |
بنية CSS
animation: name duration timing-function delay iteration-count
direction fill-mode play-state;
قيم الملكية
Value | Description |
---|---|
animation-name | Specifies the name of the keyframe you want to bind to the selector |
animation-duration | Specifies how many seconds or milliseconds an animation takes to complete |
animation-timing-function | Specifies the speed curve of the animation |
animation-delay | Specifies a delay before the animation will start |
animation-iteration-count | Specifies how many times an animation should be played |
animation-direction | Specifies whether or not the animation should play in reverse on alternate cycles |
animation-fill-mode | Specifies what values are applied by the animation outside the time it is executing |
animation-play-state | 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 |
الصفحات ذات الصلة
مرجع HTML DOM: خاصية الرسوم المتحركة