-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
39 lines (39 loc) · 954 Bytes
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Snake</title>
<style>
body {
height: 100vh;
width: 100vw;
display: flex;
background-color: black;
justify-content: center;
align-items: center;
margin: 0;
}
.game-board {
background-color: #ccc;
height: 100vmin;
width: 100vmin;
display: grid;
grid-template-rows: repeat(21, 1fr);
grid-template-columns: repeat(21, 1fr);
}
.snake {
background-color: hsl(200, 100%, 50%);
border: 0.25vmin solid black;
}
.food {
background-color: hsl(50, 100%, 50%);
border: 0.25vmin solid black;
}
</style>
<script src="game.js" defer></script>
</head>
<body>
<div class="game-board"></div>
</body>
</html>