-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakeGame.css
168 lines (168 loc) · 2.96 KB
/
SnakeGame.css
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
* {
box-sizing:border-box;
}
html, body, main {
margin:0;
padding:0;
}
body {
background:black;
padding-bottom:20px;
}
.templates {
display:none;
}
.homepage {
font-family: "Monaco", "Courier", "Courier New";
color:white;
text-align:center;
margin:0;
}
.homepage h1 {
font-size:40px;
margin-top:0;
padding-top:20px;
}
.homepage h2 {
font-size:24px;
color:grey;
text-align:center;
}
.homepage .rules, .homepage .controls {
margin-left:30px;
margin-right:30px;
text-align:left;
width:320px;
display:inline-block;
vertical-align:top;
}
.homepage .controls aside.arrows {
display:inline-block;
vertical-align:top;
margin-right:50px;
padding-top:33px;
color:grey;
}
.homepage .controls section.arrows {
display:inline-block;
position:relative;
vertical-align:bottom;
text-align:center;
}
.homepage .controls .arrow {
width:40px;
height:40px;
margin:2px;
}
.homepage .controls aside.spacebar {
display:inline-block;
vertical-align:top;
margin-right:30px;
padding-top:15px;
color:grey;
}
.homepage .controls span.spacebar {
vertical-align:bottom;
border:2px solid grey;
border-radius:5px;
position:relative;
display:inline-block;
padding:10px 120px 20px 10px;
margin-bottom:15px;
font-size:12px;
}
.homepage .controls aside.escape {
color:grey;
display:inline-block;
margin-right:80px;
vertical-align:top;
padding-top:15px;
}
.homepage .controls span.escape {
vertical-align:bottom;
border:2px solid grey;
border-radius:5px;
position:relative;
display:inline-block;
padding:11px 10px;
font-size:16px;
margin-bottom:15px;
}
.homepage .difficulty .setting {
display:inline-block;
width:302px;
height:42px;
border:1px solid grey;
border-radius:5px;
padding:0;
margin:0;
position:relative;
}
.homepage .difficulty .setting input {
display:none;
}
.homepage .difficulty .setting .level {
display:inline-block;
width:100px;
height:20px;
margin:0;
padding:10px 0;
border:0;
}
.homepage .difficulty .setting .level:hover {
cursor:pointer;
}
.homepage .difficulty .setting .selector {
display:inline-block;
position:absolute;
width:90px;
height:30px;
border-radius:5px;
background:grey;
transition:left 1s;
left:5px;
top:5px;
content:"";
z-index:-1;
}
.homepage .difficulty .setting #easy:checked ~ .selector {
left:5px;
}
.homepage .difficulty .setting #medium:checked ~ .selector {
left:105px;
}
.homepage .difficulty .setting #hard:checked ~ .selector {
left:205px;
}
.homepage .start {
background:black;
color:white;
padding:10px 20px;
font-size:24px;
border:2px solid grey;
border-radius:5px;
margin-top:50px;
background:#333333;
}
.homepage .start:hover {
background:#555555;
cursor:pointer;
}
.homepage .start:active {
background:#999999;
}
.arrow.right {
transform:rotate(90deg);
}
.arrow.down {
transform:rotate(180deg);
}
.arrow.left {
transform:rotate(-90deg);
}
#snake {
position:absolute;
left:0;
top:0;
background:black;
}