How Will It End?

1. animation-fill-mode

By default, after animation completes, element instantly returns to original styles.

  • forwards: " Freeze " in final frame.
  • backwards: Apply first frame styles BEFORE animation starts (if there's delay).
  • both: Does both.

2. animation-direction

  • alternate: Play forward, then backward. Perfect for " pulsation " or " swinging " .
  • reverse: Play only backward.
Important

If you're making appearance animation (Fade In), always use forwards. Otherwise your element will disappear right after it appeared impressively.