JSFiddle - React, Tailwind, and code Playground
by Daniel Hall
HTML
<button id="replaceButton">files</button>
<div id="body"></div>
<button id="repButton">pink</button>
<div id="body2"></div>
CSS
body {
font-family: "Comic Sans MS";
background-color: black;
}
p {
font-size: 3em;
}
#body {
position: absolute;
left: 30%;
width: 30%;
height: 30%;
top: 30%;
border-radius: 50px;
background-color:;
}
#body2 {
position: absolute;
left: 15%;
top: 0%;
width: 30%;
height: 30%;
background-color: ;
}
JavaScript
var replaceButton = document
.getElementById("replaceButton");
replaceButton.addEventListener("click",replaceIt);
function replaceIt(){
document.getElementById("body")
.style.backgroundColor = "";
document.getElementById("body")
.style.backgroundColor = "#FFA07A";
}