main

animate-css/animate.css

Last updated at: 29/12/2023 09:20

jackInTheBox.css

TLDR

The provided CSS file contains a keyframe animation called jackInTheBox. This animation gradually scales up an element and rotates it, giving the impression of a box popping up like a "jack-in-the-box" toy. The CSS class .jackInTheBox is assigned to elements to apply this animation.

Classes

.jackInTheBox

Applies the jackInTheBox keyframe animation to the elements with this class. It gradually scales up and rotates the element to create a "jack-in-the-box" effect.

@keyframes jackInTheBox {
  from {
    opacity: 0;
    transform: scale(0.1) rotate(30deg);
    transform-origin: center bottom;
  }

  50% {
    transform: rotate(-10deg);
  }

  70% {
    transform: rotate(3deg);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.jackInTheBox {
  animation-name: jackInTheBox;
}