I need to change the size of a background image during an animation but it doesn't work.
Here is a simple version of my code:
document.querySelector("#Box").backgroundSize='cover';
#Box {
background-image: url(https://beebom-redkapmedia.netdna-ssl.com/wp-content/uploads/2016/01/Reverse-Image-Search-Engines-Apps-And-Its-Uses-2016.jpg);
width: 220px;
height: 220px;
}
<div id="Box"></div>
You should target the
.style