-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnake.css
56 lines (55 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
body, #overlay{
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
#viewport{
width: 80vh;
height: 80vh;
position: relative;
}
#overlay{
width: 100%;
height: 100%;
position: absolute;
top: 0;
z-index: 1;
}
#overlay > *{
display: none;
}
#overlay.start, #overlay.gameover, #overlay.pause{
background-color: rgba(0,0,0,0.8);
}
#overlay.start .start, #overlay.gameover .gameover, #overlay.pause .pause{
display: block;
}
#overlay > * > *{
display: block;
margin:auto;
}
#overlay span{
color: white;
}
#score{
position: absolute;
top: 0;
left: 100%;
margin: 0 1em;
}
#overlay.start ~ #gameview, #overlay.gameover ~ #gameview, #overlay.pause ~ #gameview{
-webkit-filter : blur(5px);
}
table{
border-spacing: 1px;
border:1px solid blue;
width: 100%;
height: 100%;
}
td.snake{
background-color: blue;
}
td.food{
background-color: red;
}