JSFiddle - React, Tailwind, and code Playground

by HDL52

HTML

<div></div>

CSS

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

div {
  transform: perspective(3000px);
  position: relative;
  width: 400px;
  height: 400px;
  transform-style: preserve-3d;
  background: wheat;
}

div::after {
  content: " ";
  position: absolute;
  background: url("https://raw.githubusercontent.com/Hongda-OSU/PicGo-2.3.1/master/imggfgf08j5ny1351ex73zy3rv7kopmpgm.png") no-repeat center/contain;

  width: 100%;
  height: 150%;
  display: block;
  left: 10%;
  bottom: 0;
  transform: rotateX(-10deg);
  transform-origin: center 120%;

  animation-name: zoom;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
  animation-timing-function: ease-in-out;
  filter: drop-shadow(-10px 10px 10px rgba(0, 0, 0, 0.5));
}

@keyframes zoom {
  0% {
    transform: rotateX(-10deg) scale(0.5);
    filter: drop-shadow(-5px 5px 5px rgba(0, 0, 0, 0));
  }

  40% {
    transform: rotateZ(-10deg) rotateX(-10deg) scale(0.7);
    filter: drop-shadow(-10px 10px 10px rgba(0, 0, 0, 0.5));
  }

  60% {
    transform: rotateZ(-10deg) rotateX(-10deg) scale(0.7);
    filter: drop-shadow(-10px 10px 10px rgba(0, 0, 0, 0.5));
  }

  100% {
    transform: rotateX(-10deg) scale(0.5);
    filter: drop-shadow(-5px 5px 5px rgba(0, 0, 0, 0));
  }
}