Pause and Play Animations

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.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *