JSFiddle - React, Tailwind, and code Playground

by Sam Westwood

HTML

<div> <img class="element-animation" src="https://i.imgur.com/PFjNiVW.png" alt="upper"> <img class="bottom" src="https://i.imgur.com/wiCVbv1.png" alt="bottom"></div>

CSS

.bottom{
  position: absolute;
  z-index:2;
  left:8px;
  top:5px;
  transform:  rotate(16deg) ;
  
}

.element-animation{
  position: absolute;
  top:7px;
  z-index:1;
  animation: animationFrames ease-in 1s;
  animation-iteration-count: infinite;
  transform-origin: 50% 100%;
  -webkit-animation: animationFrames ease-in 1s;
  -webkit-animation-iteration-count: infinite;
  -webkit-transform-origin: 50% 100%;
  -moz-animation: animationFrames ease-in 1s;
  -moz-animation-iteration-count: infinite;
  -moz-transform-origin: 50% 100%;
  -o-animation: animationFrames ease-in 1s;
  -o-animation-iteration-count: infinite;
  -o-transform-origin: 50% 100%;
  -ms-animation: animationFrames ease-in 1s;
  -ms-animation-iteration-count: infinite;
  -ms-transform-origin: 50% 100%;
}

@keyframes animationFrames{
  0% {
    transform:  rotate(-3deg) ;
  }
  50% {
    transform:  rotate(3deg) ;
  }
  100% {
    transform:  rotate(-3deg) ;
  }
}

@-moz-keyframes animationFrames{
  0% {
    transform:  rotate(-3deg) ;
  }
  50% {
    transform:  rotate(3deg) ;
  }
  100% {
    transform:  rotate(-3deg) ;
  }
}


@-webkit-keyframes animationFrames {
  0% {
    transform:  rotate(-3deg) ;
  }
  50% {
    transform:  rotate(3deg) ;
  }
  100% {
    transform:  rotate(-3deg) ;
  }
}


@-o-keyframes animationFrames {
   0% {
    transform:  rotate(-3deg) ;
  }
  50% {
    transform:  rotate(3deg) ;
  }
  100% {
    transform:  rotate(-3deg) ;
  }
}


@-ms-keyframes animationFrames {
 0% {
    transform:  rotate(-3deg) ;
  }
  50% {
    transform:  rotate(3deg) ;
  }
  100% {
    transform:  rotate(-3deg) ;
  }
}