JSFiddle - React, Tailwind, and code Playground
HTML
<div class="bounce"></div>
CSS
@-webkit-keyframes bounce {
from{ -webkit-transform: translate(0px,0px); }
to { -webkit-transform: translate(0px,-30px); }
}
@-moz-keyframes bounce {
from { -moz-transform: translate(0px,0px); }
to { -moz-transform: translate(0px,-30px); }
}
.bounce{
display:block;
height:20px;
width:20px;
background:#ff0000;
border-radius:20px;
margin:50px;
-webkit-animation-name: bounce;
-webkit-animation-duration:.3s;
-webkit-animation-direction:alternate;
-webkit-animation-timing-function:linear;
-webkit-animation-delay:0s;
-webkit-animation-iteration-count:infinite;
-moz-animation-name: bounce;
-moz-animation-duration:.3s;
-moz-animation-direction:alternate;
-moz-animation-timing-function:linear;
-moz-animation-delay:0s;
-moz-animation-iteration-count:infinite;
}