File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< title > Tetris Game</ title >
5
+ < meta name ="viewport " content ="user-scalable=no maximum-scale=1.0 ">
5
6
< link rel ="stylesheet " type ="text/css " href ="style.css " />
6
7
< link rel ="icon " href ="https://leoncoolmoon.github.io/icon.png " />
7
8
Original file line number Diff line number Diff line change 1
1
body {
2
2
overflow : hidden;
3
3
background : # d7d7d7 ;
4
+ display : flex;
5
+ align-items : center;
6
+ justify-content : center;
7
+ min-height : 100vmin ;
4
8
}
9
+
5
10
# tetris {
6
11
width : 360px ;
7
12
border : 1px solid black;
8
13
padding : 20px ;
9
14
}
15
+
10
16
# canvas {
11
17
width : 200px ;
12
18
height : 440px ;
13
19
background-color : # 000 ;
14
20
position : relative;
15
21
color : # fff ;
16
22
}
23
+
17
24
# canvas h1 {
18
25
margin : 0 ;
19
26
padding : 0 ;
20
27
text-align : center;
21
28
font-size : 30px ;
22
29
padding-top : 200px ;
23
30
}
31
+
24
32
.piece {
25
33
border : 1px solid white;
26
34
position : absolute;
@@ -50,39 +58,48 @@ body {
50
58
height : 19px ;
51
59
border : 1px solid white;
52
60
}
61
+
53
62
.type0 {
54
63
background-color : # a000f0 ;
55
64
}
65
+
56
66
.type1 {
57
67
background-color : # 00f0f0 ;
58
68
}
69
+
59
70
.type2 {
60
71
background-color : # f0a000 ;
61
72
}
73
+
62
74
.type3 {
63
75
background-color : # 0000f0 ;
64
76
}
77
+
65
78
.type4 {
66
79
background-color : # 00f000 ;
67
80
}
81
+
68
82
.type5 {
69
83
background-color : # f00000 ;
70
84
}
85
+
71
86
.type6 {
72
87
background-color : # f0f000 ;
73
88
}
89
+
74
90
# next_shape {
75
91
position : relative;
76
92
background-color : # 000 ;
77
93
border : 1px solid white;
78
94
width : 110px ;
79
95
height : 110px ;
80
96
}
97
+
81
98
# info {
82
99
background-color : # 000 ;
83
100
color : # fff ;
84
101
float : right;
85
102
width : 110px ;
86
103
height : 420px ;
87
104
padding : 10px ;
88
- }
105
+ }
You can’t perform that action at this time.
0 commit comments