-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnake.html
105 lines (92 loc) · 2.6 KB
/
snake.html
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
<!DOCTYPE html>
<html>
<head>
<style>
#container {
width: 800px;
height: 800px;
display: grid;
grid-template-columns: repeat(20,5%);
grid-template-rows: repeat(20,5%);
background-color: black;
margin: auto;
}
.body {
background-color: red;
border: 5px solid white;
}
.apple {
width: 40px;
height: 40px;
grid-row-start: 10;
grid-column-start: 10;
}
#score {
text-align: center;
}
.play {
width: 350px;
height: 80px;
font-size: 40px;
grid-row-start: 8;
grid-column-start: 7;
}
.settings {
width: 350px;
height: 80px;
font-size: 40px;
grid-row-start: 12;
grid-column-start: 7;
}
.restart {
width: 350px;
height: 80px;
font-size: 40px;
grid-row-start: 10;
grid-column-start: 7;
}
.restartTalk {
width: 400px;
color: white;
font-size: 40px;
grid-row-start: 6;
grid-column-start: 7;
}
.quit {
width: 350px;
height: 80px;
font-size: 40px;
grid-row-start: 13;
grid-column-start: 7;
}
#restartBackground {
grid-row-start: 1;
grid-row-end: 21;
grid-column-start: 1;
grid-column-end: 21;
background-color: black;
opacity: 50%;
}
.goBack {
width: 350px;
height: 80px;
font-size: 40px;
grid-row-start: 12;
grid-column-start: 7;
}
.music {
width: 350px;
height: 80px;
font-size: 40px;
grid-row-start: 8;
grid-column-start: 7;
}
</style>
</head>
<body>
<h1 id="score">score: <span id="length">1</span></h1>
<div id="container">
</div>
<script src="game.js" defer type="module"></script>
</body>
</html>