JSFiddle - React, Tailwind, and code Playground
HTML
<div class="red anim-test">
test
</div>
<div class="green">
test
</div>
CSS
.red{
width: 100%;
border: #f00 solid 1px;
}
.green{
width: 100%;
border: #0f0 solid 1px;
}
.anim-test{
transition: all 1s linear;
animation: move-anim 1s ease-in-out infinite;
}
@keyframes move-anim {
0% {
opacity: 1;
}
100% {
opacity: 0;
margin-top: -20px;
}
}