-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
34 lines (32 loc) · 1.11 KB
/
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
<!DOCTYPE html>
<html>
<head>
<title>Snake Game</title>
<script src="snake.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<style type="text/css" media="screen">
canvas, img { display:block; margin:1em auto; border:1px solid black; }
canvas { background:url(images/background.png) }
</style>
</head>
<body>
<canvas id="canvas" >
</canvas>
<div id="images" style="display: none;">
<img src="images/snakebody.png" id="sbody" width="20" height="20">
<img src="images/food.png" id="food" width="20" height="20">
</div>
<audio id="music" loop>
<source src="sound/bach.mp3" type="audio/mp3" />
<source src="sound/bach.ogg" type="audio/ogg"/>
</audio>
<audio id="gameover" loop>
<source src="sound/funeral_march.mp3" type="audio/mp3" />
<source src="sound/funeral_march.ogg" type="audio/ogg"/>
</audio>
<audio id="eat">
<source src="sound/arcade_echo.mp3" type="audio/mp3" />
<source src="sound/arcade_echo.ogg" type="audio/ogg"/>
</audio>
</body>
</html>