JSFiddle - React, Tailwind, and code Playground
by himel023
HTML
<h1 id = "text">REACT</h1>
<button id = "btn-1">
R
</button>
<button id = "btn-2">
E
</button>
<button id = "btn-3">
A
</button>
<button id = "btn-4">
C
</button>
<button id = "btn-5">
T
</button>
CSS
body{
background-color: black;
}
button{
background-color:
}
JavaScript
text= document.getElementById("text");
btn1 = document.getElementById('btn-1');
btn2 = document.getElementById('btn-2');
btn3 = document.getElementById('btn-3');
btn4 = document.getElementById('btn-4');
btn5 = document.getElementById('btn-5');
setInterval(()=>{
text.style.color = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
btn1.style.backgroundColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
btn2.style.backgroundColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
btn3.style.backgroundColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
btn4.style.backgroundColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
btn5.style.backgroundColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
},100)