Hello, I'm trying to make Javascript a function that gives zoom
slow in my image, that is, increasing my background-size
slowly, to give impression of movement in the image.
I tried to do this function, but when running the site, I was without any success.
function zoomLento(){
var imagem = document.getElementById("imagem");
for (var i = 100; i <= 200; i++){
setTimeout(function(){
imagem.style.backgroundSize = i;
}, 10 * (i / 10))
}
}