JSFiddle - React, Tailwind, and code Playground

HTML

<div id="block">moving text</div>

CSS

@keyframes mymove
{
0%   {top:0px;}
25%  {top:200px;}
50%  {top:100px;}
75%  {top:200px;}
100% {top:0px;}
}

#block {
	position:absolute;
	animation: mymove 2s infinite;
}