diff --git a/src/script.js b/src/script.js index 73ff3df..af23703 100644 --- a/src/script.js +++ b/src/script.js @@ -246,8 +246,8 @@ class Game2048 { const tile = document.createElement('div'); tile.className = `tile tile-${this.grid[row][col]}`; tile.textContent = this.grid[row][col]; - tile.style.left = `${col * 121.25}px`; - tile.style.top = `${row * 121.25}px`; + tile.style.left = `${col * 124.25}px`; + tile.style.top = `${row * 124.25}px`; if (this.grid[row][col] > 2048) { tile.className = 'tile tile-super'; diff --git a/src/style.css b/src/style.css index 4434194..e017a87 100644 --- a/src/style.css +++ b/src/style.css @@ -25,7 +25,7 @@ h1.title { } .container { - width: 500px; + width: 512px; margin: 0 auto; } @@ -141,8 +141,8 @@ h1.title { touch-action: none; background: #bbada0; border-radius: 10px; - width: 500px; - height: 500px; + width: 512px; + height: 512px; box-sizing: border-box; } @@ -208,7 +208,7 @@ h1.title { } .grid-row { - margin-bottom: 15px; + margin-bottom: 18px; } .grid-row:last-child { @@ -220,7 +220,7 @@ h1.title { height: 106.25px; background: rgba(238, 228, 218, 0.35); border-radius: 6px; - margin-right: 15px; + margin-right: 18px; float: left; }