JSFiddle - React, Tailwind, and code Playground

by luka kupunia

HTML

<div class="box">
  <div class="demo">1</div>
</div>

CSS

body {
  margin: 0;
}
* {
  box-sizing: border-box;
}
div.box {
  width: 100%;
  height: 400px;
  text-transform: uppercase;
  text-align: center;
  font-size: 50px;
  font-weight: 'cursive';
  font-weight: bold;
  position: relative;
  background-image: linear-gradient(to right top, rgb(39, 196, 245), rgb(163, 7, 186));
}
div.demo {
  width: 100px;
  height: 100px;
  margin: auto;
  background: white;
  position: absolute;
  left: 50%;
  margin-left: -50px;
  top: 150px;
  animation: luka 2s cubic-bezier(0, 0.88, 0.97, 0.33);
  transform-origin: top left;
}
@keyframes luka {
  40% {
    transform: translateX(-160px) rotateY(0deg);
  }
  50% {
    transform: translateX(-200px) rotateY(360deg);
    animation-timing-function: cubic-bezier(0.63, 0.02, 0.16, 1)
  }
  51% {
    opacity: 0;
  }
  100% {
    transform: translateX(0px) rotateY(360deg);
  }
}