-
Notifications
You must be signed in to change notification settings - Fork 0
/
snake-game.css
130 lines (115 loc) · 2.04 KB
/
snake-game.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
html * {
font-family: 'Baloo Tamma 2', cursive, Arial, Helvetica, sans-serif;
}
/*
--------------------------
PURE ELEMENTS
--------------------------
*/
button {
padding: 10px;
font-size: 15px;
background-color: rgb(184, 110, 184);
border: 1px solid black;
color: white;
outline: none;
border-radius: 5px;
}
button:hover {
cursor: pointer;
background-color: rgb(143, 86, 143);
}
/*
--------------------------
GENERAL
--------------------------
*/
.modal {
display: none;
position: absolute;
background-color: rgba(41, 41, 41, .7);
width: 806px;
height: 100%;
z-index: 999;
}
.active {
display: block;
}
/*
--------------------------
GAME
--------------------------
*/
.title {
text-align: center;
}
#game {
display: flex;
position: relative;
width: auto;
height: auto;
margin: auto;
/* border: 1px solid black; */
justify-content: center;
}
#game-canvas {
border: 3px solid brown;
top: 0;
left: 0;
}
/*
--------------------------
SCOREBOARD
--------------------------
*/
.scoreboard {
position: relative;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding-bottom: 3px;
}
.scoreboard img {
height: 40px;
margin-right: 5px;
}
.scoreboard span {
margin-right: 20px;
}
/*
--------------------------
GAME OVER SECTION
--------------------------
*/
.game-over {
position: relative;
top: 150px;
width: 50%;
max-width: 400px;
min-width: 300px;
text-align: center;
margin: auto;
padding-bottom: 21px;
border:1px solid #ccc;
border-radius: 5px;
background-color: #20649B;
color: rgb(235, 231, 231);
box-sizing: border-box;
}
.leaderboard {
list-style: none;
margin: auto;
padding: 10px;
max-width: 150px;
}
.leaderboard li img {
height: 40px;
margin-bottom: 10px;
}
.leaderboard li {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}