-
Notifications
You must be signed in to change notification settings - Fork 1
/
snake.css
63 lines (54 loc) · 891 Bytes
/
snake.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
body {
font-family: sans-serif;
}
h1 {
text-align: center;
}
#grid {
width: 800px;
display: flex;
margin: 0 auto;
flex-wrap: wrap;
border: 1px solid gray;
box-shadow: 0 0 2px 1px gray;
}
.cell {
width: 8px;
height: 8px;
}
.snake {
background-color: black;
border-radius: 50%;
}
.ghost {
background-color: gray;
}
.normalFood {
background-color: red;
border-radius: 50%;
}
.specialFood {
background-color: #888888;
animation-duration: 0.5s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-name: blink;
}
@keyframes blink {
from {
border-radius: 20%;
box-shadow: 0 0 0 0 #888888;
}
to {
border-radius: 50%;
box-shadow: 0 0 0 2px #888888;
}
}
#scoreBoard {
margin: 0 auto;
margin-top: 10px;
height: 20px;
width: 90px;
border: solid 1px rgba(0, 0, 0, 0.5);
text-align: center;
}