JSFiddle - React, Tailwind, and code Playground
HTML
<div id="block">moving text</div>
CSS
@-webkit-keyframes mymove {
0% {
top:0px;
}
25% {
top:200px;
}
50% {
top:100px;
}
75% {
top:200px;
}
100% {
top:0px;
}
}
#block {
position:absolute;
-webkit-animation: mymove 2s infinite;
}