An animation is applied to an element using the animationproperty. background-color of the
It will just distract your users and might annoy a good slice of them. The most important point is random movement of particles. CSS animations do not affect an element before the first keyframe is played or after the last keyframe is played. You must define how your animation works using keyframes. run forwards first, then backwards:The following example uses the value "alternate-reverse" to make the animation element when the animation is 25% complete, 50% complete, and again when the animation is 100% complete:The following example has a 2 seconds delay before starting the animation:Negative values are also allowed. Example of an animation that rotates an item: Inside the @keyframesdefinition you can have as many intermediate waypoints as you want. W3Schools is optimized for learning, testing, and training. playing for 2 seconds:The following example will run the animation 3 times before it stops:The following example uses the value "infinite" to make the animation If using negative values, the animation Mind the initial and final state of your elements W3Schools is optimized for learning, testing, and training. element when the animation is 25% complete, 50% complete, and again when the animation is 100% complete:The following example will change both the background-color and the position of the
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. Even though Animate.css provides utility classes for repeating animations, including an infinite one, you should avoid endless animations.