I want to create 3 images in different y positon however doing this code it shows the position changed in devtools but not in the browser


    <div class="img">

        <!-- <img src="../tree-vector.webp" alt=""> -->


    <div id="road" class="mainRoad">

let numTimes = 5;

    let tree = document.querySelector(".img");

for(let i = 0; i < numTimes; i+=2){

    let tr = tree.getBoundingClientRect();


    tree.y = (50* i);