JSFiddle - React, Tailwind, and code Playground
HTML
<div id="flashBitches"></div>
CSS
#flashBitches {
width: 100%;
height: 1200px;
overflow: hidden;
background: #000;
opacity: .5;
position: absolute;
top: 0px;
left: 0px;
z-index: 99;
}
JavaScript
$(function() {
function flashMe() {
var hue = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
setTimeout(function() {
$("#flashBitches").css({
'background': hue
});
}, 20);
setTimeout(function() {
// flashMe();
}, 20);
}
flashMe();
});