JSFiddle - React, Tailwind, and code Playground
by Kingdaro
HTML
<div id='lol'>shut the fuck up ok</div>
CSS
div#lol{
font: 32pt Verdana, sans-serif;
font-weight: bold;
width: intrinsic;
position: absolute;
}
JavaScript
var div = document.getElementById('lol');
var time = 0;
var fps = 30;
function herp() {
time += 1/fps;
div.style.top = window.innerHeight/2 - div.clientHeight/2;
div.style.color = "hsl(" + time*100 % 360 + ", 90%, 50%)";
div.style.webkitTransform = "rotate("+ Math.sin(time)*30 +"deg)";
console.log(time * 360);
setTimeout(herp, 1000/fps);
}
herp();