-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnake1.html
More file actions
44 lines (44 loc) · 820 Bytes
/
snake1.html
File metadata and controls
44 lines (44 loc) · 820 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>Snake</title>
<script type="text/javascript" src="snake1.js"></script>
<style>
html,body{
width:100%;
height:100%;
margin:0;
padding:0;
}
body{
display:flex;
align-items: center;
justify-content: center;
background-color: lightgreen;
}
#context{
border: 6px solid black;
background-color: #ffcc00;
}
div{
margin-top:50px;
position: absolute;
align-self:flex-start;
font-size: 20px;
}
h1{
display: none;
position: absolute;
margin:0;
padding:0;
font-style: Arial;
font-size: 70px;
}
</style>
</head>
<body>
<div><b>Score: </b><span id="number"></span></div>
<canvas id="context" width="450" height="400"></canvas>
<h1 id="h1">Game Over</h1>
</body>
</html>