File tree 3 files changed +25
-2
lines changed
3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Game {
14
14
drawSquare ( arr ) {
15
15
let htmlData = `
16
16
<h1>15 puzzle</h1>
17
- <table class="square-wrapper"><tr>` ;
17
+ <table class="square-wrapper"><tbody>< tr>` ;
18
18
19
19
for ( let i = 0 ; i < arr . length ; i ++ ) {
20
20
if ( arr [ i ] !== null ) {
@@ -24,7 +24,7 @@ class Game {
24
24
}
25
25
}
26
26
27
- htmlData += `</tr></table>` ;
27
+ htmlData += `</tr></tbody></ table>` ;
28
28
29
29
return this . data . innerHTML = htmlData ;
30
30
}
Original file line number Diff line number Diff line change 3
3
4
4
< head >
5
5
< meta charset ="utf-8 ">
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
7
< title > Puzzle 15</ title >
7
8
< link rel ="icon " type ="image/x-icon " href ="img/favicon.ico ">
8
9
< link rel ="apple-touch-icon-precomposed " href ="img/little-penguin-152-27563.png ">
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ td.cell {
67
67
box-sizing : border-box;
68
68
height : 114px ;
69
69
padding : 12px 15px ;
70
+ font-size : 40px ;
70
71
}
71
72
72
73
.cell : hover {
@@ -84,4 +85,25 @@ td.cell {
84
85
85
86
.no-events {
86
87
pointer-events : none;
88
+ }
89
+
90
+
91
+ @media (max-width : 600px ) {
92
+ div .container {
93
+ width : 100% ;
94
+ }
95
+
96
+ .square-wrapper {
97
+ max-width : 100vw ;
98
+ max-height : unset;
99
+ height : 100vw ;
100
+ }
101
+
102
+ td .cell {
103
+ line-height : 22vw ;
104
+ height : 22vw ;
105
+ font-size : 10vw ;
106
+ padding : 0 ;
107
+ margin : 2px ;
108
+ }
87
109
}
You can’t perform that action at this time.
0 commit comments