Skip to content

Commit e2f4527

Browse files
committed
optomize size
1 parent 0e8678c commit e2f4527

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

08-Tetris-Game/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<title>Tetris Game</title>
5+
<meta name="viewport" content="user-scalable=no maximum-scale=1.0">
56
<link rel="stylesheet" type="text/css" href="style.css" />
67
<link rel="icon" href="https://leoncoolmoon.github.io/icon.png" />
78

08-Tetris-Game/style.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
body {
22
overflow: hidden;
33
background: #d7d7d7;
4+
display: flex;
5+
align-items: center;
6+
justify-content: center;
7+
min-height: 100vmin;
48
}
9+
510
#tetris {
611
width: 360px;
712
border: 1px solid black;
813
padding: 20px;
914
}
15+
1016
#canvas {
1117
width: 200px;
1218
height: 440px;
1319
background-color: #000;
1420
position: relative;
1521
color: #fff;
1622
}
23+
1724
#canvas h1 {
1825
margin: 0;
1926
padding: 0;
2027
text-align: center;
2128
font-size: 30px;
2229
padding-top: 200px;
2330
}
31+
2432
.piece {
2533
border: 1px solid white;
2634
position: absolute;
@@ -50,39 +58,48 @@ body {
5058
height: 19px;
5159
border: 1px solid white;
5260
}
61+
5362
.type0 {
5463
background-color: #a000f0;
5564
}
65+
5666
.type1 {
5767
background-color: #00f0f0;
5868
}
69+
5970
.type2 {
6071
background-color: #f0a000;
6172
}
73+
6274
.type3 {
6375
background-color: #0000f0;
6476
}
77+
6578
.type4 {
6679
background-color: #00f000;
6780
}
81+
6882
.type5 {
6983
background-color: #f00000;
7084
}
85+
7186
.type6 {
7287
background-color: #f0f000;
7388
}
89+
7490
#next_shape {
7591
position: relative;
7692
background-color: #000;
7793
border: 1px solid white;
7894
width: 110px;
7995
height: 110px;
8096
}
97+
8198
#info {
8299
background-color: #000;
83100
color: #fff;
84101
float: right;
85102
width: 110px;
86103
height: 420px;
87104
padding: 10px;
88-
}
105+
}

0 commit comments

Comments
 (0)