-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.css
More file actions
123 lines (108 loc) · 2.2 KB
/
game.css
File metadata and controls
123 lines (108 loc) · 2.2 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#snake-length {
background-color: white;
padding-left: 50px;
padding-top: 20px;
color: rgb(0, 0, 0);
position: absolute;
top: 15%;
left: 0%;
width: 10%;
height: 20%;
z-index: -1;
}
body {
background-image: url("m.jpg");
}
#timer {
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
border-radius: 50px;
position: absolute;
top: 15%;
left: 3%;
background-color: rgb(0, 0, 0);
border: 4px solid rgb(255, 255, 255);
width: 5%;
height: 5%;
background-size: contain;
padding: 10px;
color: rgb(206, 69, 69);
font-size: 20px;
text-align: center;
}
#game-board {
width: 500px;
height: 500px;
background-color: black;
border: 3px solid rgb(255, 255, 255);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-image: url("m.jpg");
background-size: cover;
background-position: center;
width: 500px;
height: 500px;
z-index: 1;
background-image: url("B.png");
}
.snake {
width: 20px;
height: 20px;
background-color: rgb(48, 255, 48);
border: 0.2px solid black;
position: absolute;
}
.food {
width: 20px;
height: 20px;
background-color: red;
border: 0.2px solid black;
position: absolute;
}
#snake-length.p {
top: 150px;
z-index: 1;
}
h1 {
text-align: center;
color: rgb(255, 255, 255);
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif, "Helvetica Neue", Helvetica, sans-serif;
}
#snake-length {
color: black;
position: absolute;
top: 22%;
left: 0%;
border: solid 2px black;
}
#start-button {
position: absolute;
bottom: 40px;
left: 50%;
transform: translateX(-50%);
padding: 10px 20px;
background-color: #ff0000;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
}
#resume-button {
position: absolute;
bottom: 40px;
left: 58%;
width: 100px;
border-radius: 5px;
height: 20px;
z-index: 2;
}
#pause-button {
position: absolute;
bottom: 40px;
left: 35%;
width: 100px;
border-radius: 5px;
height: 20px;
z-index: 2;
}