I want to make a circle background to fill in gradually using linear-gradient. I have my CSS and JavaScrpit file, only I can't figure out how to select the linear-gradient property in JS.
<div id="circle" class="circleBase "></div>
#circle{
width: 300px;
height: 300px;
background-color:blue;
background: linear-gradient(90deg, #FFC0CB 0%,white 100%);
}
function changeBackground() {
var elem = document.getElementById("circle");
var width = 1;
var id = setInterval(frame, 10);
function frame() {
if (width >= 100) {
clearInterval(id);
} else {
width++;
elem.style = ????
}
}
}