AI CSS Animations

Bounce In Up

Launches up from below stretched tall, overshoots, drops back into a small squash and settles. Reads like a spring jumping into place rather than a ball dropping.

Also known as: bounce in from bottom css, spring up animation css, jump in animation.

Jump

HTML

<div class="kfa-bounce-in-up">Jump</div>

CSS

.kfa-bounce-in-up {
  --c: var(--kfa-color, #3b82f6);
  font-size: var(--kfa-size, 16px);
  display: grid;
  place-items: center;
  width: 5.5em;
  height: 5.5em;
  border-radius: 1em;
  background: var(--c);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  box-shadow: 0 0.6em 1.4em -0.6em color-mix(in srgb, var(--c) 70%, transparent);
  animation: kfa-bounce-in-up-kf 0.9s both;
}
@keyframes kfa-bounce-in-up-kf {
  0% {
    opacity: 0;
    transform: translateY(2.2em) scale(0.9, 1.2);
    animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
  }
  45% {
    opacity: 1;
    transform: translateY(-0.75em) scale(0.97, 1.04);
    animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0);
  }
  65% {
    transform: translateY(0.12em) scale(1.06, 0.94);
    animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
  }
  80% {
    transform: translateY(-0.18em) scale(0.99, 1.01);
    animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1);
  }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kfa-bounce-in-up, .kfa-bounce-in-up *, .kfa-bounce-in-up::before, .kfa-bounce-in-up::after, .kfa-bounce-in-up *::before, .kfa-bounce-in-up *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Customizing this snippet

  • Color: set --kfa-color on the element or a parent. Currently previewing #3b82f6.
  • Base size: set --kfa-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 16px.
  • Speed: change the duration on the transition or animation shorthand. Staggered delays are relative, so they keep their rhythm.
  • Reduced motion: the rule at the end of the CSS turns the motion off for people who asked their OS for less of it. Keep it.

Similar keyframe animations