AI CSS Animations

Jello Wobble

The word wobbles like jelly, skewing back and forth with decreasing force before settling. A loop with a long pause, so it draws the eye without becoming annoying.

Also known as: jelly text, wobble animation, skew bounce.

Wobble

HTML

<div class="txt-jello">Wobble</div>

CSS

.txt-jello {
  --c: var(--txt-color, #3b82f6);
  font-size: var(--txt-size, 32px);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  display: inline-block;
  color: var(--c);
  transform-origin: center;
  animation: txt-jello-wobble 3s ease infinite;}
@keyframes txt-jello-wobble {
  0%, 30%, 100% { transform: skewX(0) skewY(0); }
  8%   { transform: skewX(-12deg) skewY(-12deg); }
  12%  { transform: skewX(6deg) skewY(6deg); }
  16%  { transform: skewX(-3deg) skewY(-3deg); }
  20%  { transform: skewX(1.5deg) skewY(1.5deg); }
  24%  { transform: skewX(-0.5deg) skewY(-0.5deg); }
}

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

Customizing this snippet

  • Color: set --txt-color on the element or a parent. Currently previewing #3b82f6.
  • Font size: set --txt-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 40px.
  • 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 text animations