-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnake.css
More file actions
103 lines (86 loc) · 1.28 KB
/
snake.css
File metadata and controls
103 lines (86 loc) · 1.28 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
/* mini reset */
* {
padding: 0;
margin: 0;
border: 0;
line-height: 1;
}
body {
padding-top: 1em;
}
h1, p {
text-align: center;
}
h1 {
margin-bottom: 0.5em;
margin-top: 1em;
line-height: 0;
}
p {
margin-top: 1em;
}
#pause,
.score {
text-align: center;
display: block;
margin-bottom: 0.5rem;
}
.score {
color: black;
font-weight: bold;
}
.description {
font-size: 0.9em;
font-style: italic;
margin-bottom: 0.5em;
}
#grid {
border: 1px solid gray;
width: 400px;
margin: 0 auto;
line-height: 0;
}
.square {
border: 1px solid gray;
width: 18px;
height: 18px;
display: inline-block;
line-height: 0;
overflow: hidden;
}
.square span {
display: inline-block;
margin: 0 auto;
line-height: 1;
height: 100%;
width: 100%;
text-align: center;
}
.is-snake {
background: gray;
}
.food {
width: 16px;
height: 16px;
background: no-repeat center center;
background-size: cover;
background-image: url("images/food.png");
}
.head {
width: 12px;
height: 12px;
background: no-repeat center center;
background-size: cover;
}
.l {
background-image: url("images/left.png");
}
.r {
background-image: url("images/right.png");
}
.u {
background-image: url("images/up.png");
}
.d {
background-image: url("images/down.png");
}