how to populate a grid with images in html
<div class="grid-container">
<!-- images will come here -->
</div>
how to populate a grid with images in html
<div class="grid-container">
<!-- images will come here -->
</div>
how to populate a grid with images in html
<div class="grid-container">
<div class="grid-container">img 1 here</div>
</div>
how to populate a grid with images in html
const gridContainer = document.querySelector('.grid-container');
for (let i = 1; i < 101; i++) {
const img = document.createElement('img');
img.src = `path-to-img/seperate-${i}.png`;
gridContainer.append(img);
}
how to populate a grid with images in html
var imagePath="./image/seperate-";
var numberOfImage=100;
var parentDIV = document.getElementsByClassName("grid-container-parent")[0];
for(var i=0;i<numberOfImage;i++){
var tempDIV= document.createElement('div');
tempDIV.setAttribute('class','grid-container');
var innerHTML= `<img src='`+(imagePath+i)+`.png'></img>`
tempDIV.innerHTML=innerHTML;
parentDIV.appendChild(tempDIV);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us