JSFiddle - React, Tailwind, and code Playground
by cssGuy
HTML
<div id="box"></div>
CSS
#box {
width: 100px;
height: 100px;
margin: 100px auto;
background-color: rebeccapurple;
animation: spin 1s linear infinite
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
JavaScript
// Let's introduce the jank on the main thread
// css animation still goes on but with a little jank
setInterval(function () {
console.log("hello");
});
for (var i = 0; i < 50000; i++) {
console.log(i);
}