main

animate-css/animate.css

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

flip.css

TLDR

This file contains CSS code that defines an animation called "flip" using the @keyframes rule. The animation will play on elements with the class "animated flip" and simulate a flipping effect by transforming the element's perspective, scale, translation, and rotation at different keyframes.

Methods

N/A

Classes

Class 1 name

.animated.flip

Class 1 description

This class is applied to elements that should have the "flip" animation. It sets the backface visibility to visible and specifies the animation name as "flip".

@keyframes flip {
  from {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
    animation-timing-function: ease-out;
  }

  40% {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
      rotate3d(0, 1, 0, -190deg);
    animation-timing-function: ease-out;
  }

  50% {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
      rotate3d(0, 1, 0, -170deg);
    animation-timing-function: ease-in;
  }

  80% {
    transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)
      rotate3d(0, 1, 0, 0deg);
    animation-timing-function: ease-in;
  }

  to {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
    animation-timing-function: ease-in;
  }
}

.animated.flip {
  backface-visibility: visible;
  animation-name: flip;
}