JSFiddle - React, Tailwind, and code Playground

by luka kupunia

HTML

<div class="box">
  <div class="box1"></div>
</div>

CSS

body {
  margin: 0;
}
div.box {
  width: 100%;
  position: relative;
  padding-top: 100px;
  perspective: 5000px;
  border-bottom: 1px solid black;
}
div.box1 {
  width: 50%;
  margin: auto;
  height: 400px;
  background: yellow;
  transform-style: preserve-3d;
  transform: rotateX(-80deg);
  transform-origin: bottom;
  animation: a 1s ease-out forwards;
}
@keyframes a {
  100% { transform: rotateX(0deg)}
}