diff --git a/index.js b/index.js index 32f98ec..997b8d3 100644 --- a/index.js +++ b/index.js @@ -1 +1,13 @@ -document.body.innerHTML = "Hello world!"; \ No newline at end of file +const WIDTH = 4; //64; +const HEIGHT = 4; //32; + +for(let y = 0; y < HEIGHT; y++) { + const row = document.createElement('div'); + row.className = 'row'; + for(let x = 0; x < WIDTH; x++) { + const pixel = document.createElement('div'); + pixel.className = 'pixel'; + row.appendChild(pixel); + } + document.body.appendChild(row); +} \ No newline at end of file diff --git a/style.css b/style.css index e69de29..b229fab 100644 --- a/style.css +++ b/style.css @@ -0,0 +1,14 @@ +body { + display: flex; + flex-direction: column; +} + +.row { + display: flex; +} + +.pixel { + width: 14px; + height: 14px; + border: 1px solid rgb(229, 229, 229); +} \ No newline at end of file