main

animate-css/animate.css

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

rubberBand.css

TLDR

This CSS file defines the rubberBand animation keyframes and a corresponding .rubberBand class.

Methods

None

Classes

.rubberBand

This class applies the rubberBand animation to the element it is assigned to. The animation causes the element to "stretch" and "bounce" in a rubber band-like manner.

@keyframes rubberBand {
  from {
    transform: scale3d(1, 1, 1);
  }

  30% {
    transform: scale3d(1.25, 0.75, 1);
  }

  40% {
    transform: scale3d(0.75, 1.25, 1);
  }

  50% {
    transform: scale3d(1.15, 0.85, 1);
  }

  65% {
    transform: scale3d(0.95, 1.05, 1);
  }

  75% {
    transform: scale3d(1.05, 0.95, 1);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}

.rubberBand {
  animation-name: rubberBand;
}