-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
104 lines (85 loc) · 1.6 KB
/
style.css
File metadata and controls
104 lines (85 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
:root {
--cell-size: 40px; /* includes borders */
--cell-border: 1px; /* 1px per side */
}
* {
margin: 0;
padding: 0;
/* box-sizing: border-box; */
font-family: 'Silkscreen', sans-serif;
}
body {
background-color: antiquewhite;
}
.div {
display: block;
}
#app {
display: grid;
}
#header {
position: relative;
margin: 20px auto;
text-align: center;
font-size: 50px;
}
#grid {
width: 600px;
height: 600px;
display: grid;
margin: 0 auto;
grid-template-columns: repeat(auto-fit, var(--cell-size));
grid-template-rows: repeat(auto-fit, var(--cell-size));
border: black solid 5px;
}
#score {
position: relative;
margin: 0 auto;
text-align: center;
font-size: 30px;
}
.message {
/* position: absolute;
top: 200px;
left: 200px;
width: 200px;
height: 30%; */
opacity: 85%;
}
.message h1 {
color: black;
text-align: center;
line-height: 50px;
}
.cell {
border: var(--cell-border) dashed rgba(0, 0, 0, 0.2);
width: var(--cell-size) - 2 * var(--cell-border); /* -2 * border width for border on each side*/
height: var(--cell-size) - 2 * var(--cell-border);
background-size: contain;
opacity: 65%;
}
.snake {
background-color: darkgreen;
}
.food {
background-color: darkred;
}
.block {
background-color: black;
}
.button {
position: absolute;
top: 46%;
left: 44.5%;
width: 11%;
height: 5%;
background-color: cadetblue;
opacity: 100%;
}
.button:hover {
background-color: white;
}
.button h1 {
color: black;
text-align: center;
}