2.3 KiB
2.3 KiB
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
587d78a8367417b2b2512ae3 | Animate Elements Continually Using an Infinite Animation Count | 0 | تنشيط عناصر باستمرار باستخدام عدد الرسوم المتحركة اللانهائي |
Description
@keyframes
. خاصية الرسوم المتحركة الأخرى هي animation-iteration-count
، والذي يسمح لك بالتحكم في عدد المرات التي ترغب في تكرارها من خلال الرسوم المتحركة. في ما يلي مثال على ذلك: عدد مرات animation-iteration-count: 3;
في هذه الحالة ، ستتوقف الرسوم المتحركة بعد تشغيلها 3 مرات ، ولكن من الممكن جعل الرسم المتحرك يعمل بشكل مستمر عن طريق تعيين هذه القيمة إلى غير محدود. Instructions
animation-iteration-count
إلى بلا حدود. Tests
tests:
- text: يجب أن يكون لخاصية <code>animation-iteration-count</code> قيمة لانهائية.
testString: 'assert($("#ball").css("animation-iteration-count") == "infinite", "The <code>animation-iteration-count</code> property should have a value of infinite.");'
Challenge Seed
<style>
#ball {
width: 100px;
height: 100px;
margin: 50px auto;
position: relative;
border-radius: 50%;
background: linear-gradient(
35deg,
#ccffff,
#ffcccc
);
animation-name: bounce;
animation-duration: 1s;
animation-iteration-count: 3;
}
@keyframes bounce{
0% {
top: 0px;
}
50% {
top: 249px;
width: 130px;
height: 70px;
}
100% {
top: 0px;
}
}
</style>
<div id="ball"></div>
Solution
// solution required