imagem de fundo do CSS
background-image: url("image.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
Unusual Unicorn
background-image: url("image.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
document.getElementById('Demo').style.backgroundImage = "url('Test.png')";
const bgImage = document.querySelector('.classname')
bgImage.style.backgroundImage = "url('your-image.png')"
// Javascript createElement
const divBackground = document.createElement("div")
divBackground.style.background = 'url('your-image.png')'
document.body.appendChild(divBackground)