-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
290 lines (270 loc) · 6.31 KB
/
style.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
:root {
--color2: #eabfcb;
--color1: #fd6b9c;
--color3: #a4508b;
--color4: #2f004f;
}
html {
font-family: 'Roboto', sans-serif;
}
.main {
display: grid;
grid-template-columns: 50% 50%;
height: 100%;
text-align: center;
}
@media only screen and (max-width: 1000px) {
.main {
display: grid;
grid-template-columns: 100%;
}
}
.btn {
color: #ffffff;
font-size: 25px;
background-color: var(--color4);
padding: 10px;
border: 2px solid var(--color1);
border-radius: 5px;
font-family: 'Roboto', sans-serif;
}
/* Background */
@keyframes move {
100% {
transform: translate3d(0, 0, 1px) rotate(360deg);
}
}
.background {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: #5f0a87;
overflow: hidden;
z-index: -1;
}
.background span {
width: 20vmin;
height: 20vmin;
border-radius: 20vmin;
backface-visibility: hidden;
position: absolute;
animation: move;
animation-duration: 45;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.background span:nth-child(0) {
color: var(--color1);
top: 20%;
left: 90%;
animation-duration: 24s;
animation-delay: -14s;
transform-origin: 21vw 6vh;
box-shadow: 40vmin 0 5.9392336039133475vmin currentColor;
}
.background span:nth-child(1) {
color: var(--color1);
top: 15%;
left: 92%;
animation-duration: 9s;
animation-delay: -11s;
transform-origin: 13vw 2vh;
box-shadow: -40vmin 0 5.179507303248286vmin currentColor;
}
.background span:nth-child(2) {
color: var(--color1);
top: 58%;
left: 79%;
animation-duration: 17s;
animation-delay: -45s;
transform-origin: -23vw -7vh;
box-shadow: -40vmin 0 5.4914550965315225vmin currentColor;
}
.background span:nth-child(3) {
color: var(--color2);
top: 26%;
left: 11%;
animation-duration: 8s;
animation-delay: -11s;
transform-origin: 5vw 9vh;
box-shadow: 40vmin 0 5.583894569486294vmin currentColor;
}
.background span:nth-child(4) {
color: var(--color2);
top: 77%;
left: 15%;
animation-duration: 32s;
animation-delay: -17s;
transform-origin: -20vw -5vh;
box-shadow: 40vmin 0 5.640635291320467vmin currentColor;
}
.background span:nth-child(5) {
color: var(--color2);
top: 100%;
left: 55%;
animation-duration: 43s;
animation-delay: -42s;
transform-origin: -3vw -21vh;
box-shadow: -40vmin 0 5.9558091803644855vmin currentColor;
}
.background span:nth-child(6) {
color: var(--color3);
top: 67%;
left: 63%;
animation-duration: 13s;
animation-delay: -5s;
transform-origin: 6vw 9vh;
box-shadow: -40vmin 0 5.152800213352103vmin currentColor;
}
.background span:nth-child(7) {
color: var(--color2);
top: 68%;
left: 61%;
animation-duration: 12s;
animation-delay: -14s;
transform-origin: 5vw -7vh;
box-shadow: -40vmin 0 5.015529966338495vmin currentColor;
}
.background span:nth-child(8) {
color: var(--color1);
top: 24%;
left: 81%;
animation-duration: 45s;
animation-delay: -26s;
transform-origin: -21vw 20vh;
box-shadow: 40vmin 0 5.122361411158385vmin currentColor;
}
.background span:nth-child(9) {
color: var(--color2);
top: 57%;
left: 39%;
animation-duration: 51s;
animation-delay: -34s;
transform-origin: -14vw -3vh;
box-shadow: -40vmin 0 5.205352596815745vmin currentColor;
}
.background span:nth-child(10) {
color: var(--color3);
top: 37%;
left: 72%;
animation-duration: 14s;
animation-delay: -15s;
transform-origin: -15vw 4vh;
box-shadow: 40vmin 0 5.994042798631209vmin currentColor;
}
.background span:nth-child(11) {
color: var(--color3);
top: 67%;
left: 50%;
animation-duration: 17s;
animation-delay: -26s;
transform-origin: -13vw 6vh;
box-shadow: 40vmin 0 5.077366315353853vmin currentColor;
}
.background span:nth-child(12) {
color: var(--color3);
top: 34%;
left: 33%;
animation-duration: 20s;
animation-delay: -40s;
transform-origin: 11vw -12vh;
box-shadow: 40vmin 0 5.1152464044303905vmin currentColor;
}
.background span:nth-child(13) {
color: var(--color2);
top: 6%;
left: 11%;
animation-duration: 10s;
animation-delay: -33s;
transform-origin: -23vw -12vh;
box-shadow: -40vmin 0 5.166214717654308vmin currentColor;
}
.background span:nth-child(14) {
color: var(--color1);
top: 61%;
left: 95%;
animation-duration: 50s;
animation-delay: -49s;
transform-origin: -14vw 17vh;
box-shadow: -40vmin 0 5.4091809431550715vmin currentColor;
}
.background span:nth-child(15) {
color: var(--color3);
top: 39%;
left: 11%;
animation-duration: 17s;
animation-delay: -31s;
transform-origin: -7vw 14vh;
box-shadow: 40vmin 0 5.822595274677672vmin currentColor;
}
.background span:nth-child(16) {
color: var(--color2);
top: 18%;
left: 56%;
animation-duration: 10s;
animation-delay: -4s;
transform-origin: -4vw -6vh;
box-shadow: -40vmin 0 5.453207768017715vmin currentColor;
}
.background span:nth-child(17) {
color: var(--color2);
top: 40%;
left: 53%;
animation-duration: 22s;
animation-delay: -43s;
transform-origin: 9vw -19vh;
box-shadow: 40vmin 0 5.430088144372339vmin currentColor;
}
.background span:nth-child(18) {
color: var(--color2);
top: 98%;
left: 12%;
animation-duration: 11s;
animation-delay: -9s;
transform-origin: 16vw -8vh;
box-shadow: 40vmin 0 5.340590690371227vmin currentColor;
}
.background span:nth-child(19) {
color: var(--color1);
top: 54%;
left: 95%;
animation-duration: 43s;
animation-delay: -35s;
transform-origin: 9vw 23vh;
box-shadow: -40vmin 0 5.462361592901823vmin currentColor;
}
/* Game */
.grid {
width: 400px;
height: 400px;
display: flex;
flex-wrap: wrap;
border: 10px solid var(--color4);
background-color: var(--color2);
border-radius: 7px;
}
.grid div {
width: 40px;
height: 40px;
}
.snake {
background-color: var(--color3);
}
.apple {
background-color: var(--color1);
border-radius: 50%;
}
.hide {
display: none;
}
.footer{
/* grid-column: auto/span 1; */
font-size: 20px;
width: 100%;
text-align: center;
align-items: center;
margin: auto;
color: #ffffff;
}