JSFiddle - React, Tailwind, and code Playground
HTML
<div class="anim"></div>
CSS
body, html{
margin: 0;
width: 100%;
height: 100%;
}
div{
width: 100%;
height: 100%;
display: block;
background : rgb( 30,30,30 );
}
@keyframes changeColor{
0% { background : rgb( 30,30,30 ); }
10% { background : rgb( 255,200,0 ); }
20% { background : rgb( 30,30,30 ); }
}
.anim{
-webkit-animation: changeColor 5s infinite;
animation: changeColor 5s infinite;
}