This commit is contained in:
lolabird 2023-11-09 15:14:02 -07:00
commit 85ef7a2709
2 changed files with 16 additions and 1 deletions

View file

@ -3,5 +3,14 @@ const conWidth = container.clientWidth;
const conHeight = container.clientHeight
const grid = document.createElement("div");
let numGrid = 16;
const gridArea = numGrid ** 2;
const gridWidth = conWidth / numGrid;
const gridHeight = conHeight / numGrid;
const gridHeight = conHeight / numGrid;
grid.classList.add("grid");
grid.style.width = gridWidth + 'px';
grid.style.height = gridHeight + 'px';
for (let i = 0; i < gridArea-1; i++){
container.appendChild(grid.cloneNode(true));
}