Use animation-play-state to pause or run animations dynamically.
Example:
.box {
animation: pulse 1s infinite;
animation-play-state: paused;
}
.box:hover {
animation-play-state: running;
}
Practice Task:
Create an animation that only plays when hovered.
Leave a Reply