JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:myfirst 2s;
-webkit-animation:myfirst 2s; /* Safari and Chrome */
}
@keyframes myfirst
{
0% {background:red; left:500px; top:500px;}
100% {background:red; left:500px; top:300px;}
}
@-webkit-keyframes myfirst /* Safari and Chrome */
{
0% {background:red; left:500px; top:500px;}
100% {background:red; left:500px; top:300px;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>