JSFiddle - React, Tailwind, and code Playground
HTML
<div class="box"></div>
CSS
.box{
width:250px; height:50px;
background:blue;
border: 1px solid black;
position:fixed;
left: 50%;
margin-left:-125px;
top:0px;
animation-name: fall;
animation-duration: 1.5s;
animation-timing-function: ease-in;
animation-name: swing;
animation-duration: 4s;
animation-iteration-count:infinte;
animation-timing-function: ease-in-out;
animation-delay: 1.4s;
}
@-moz-keyframes fall{
from {top: -50px;}
to {top: 0px;}
}
@-webkit-keyframes fall{
from {top: -50px;}
to {top: 0px;}
}
@-moz-keyframes swing{
-moz-transform-origin: center top;
0%{-moz-transform:rotate(-3deg)}
50%{-moz-transform:rotate(-2deg)}
100%{-moz-transform:rotate(-3deg)}
}
@-webkit-keyframes swing{
-webkit-transform-origin:center top;
0%{-webkit-transform:rotate(-3deg)}
50%{-webkit-transform:rotate(-2deg)}
100%{-webkit-transform:rotate(-3deg)}
}