-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
64 lines (58 loc) · 1.5 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
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
<html>
<head>
<title>Pac-Man</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no">
<style type="text/css">
html, body {
overflow: hidden;
margin: 0;
width: 100vw;
height: 100vh;
background: #000;
}
#container {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
canvas {
width: 100%;
}
#gameControls {
margin-top: 5px;
}
#gameControls > span {
background: #f1f1f1;
cursor: default;
display: inline-block;
font-family: sans-serif;
padding: 5px;
border-radius: 5px;
font-size: 10px;
color: #7d7d7d;
border: 1px solid #eaeaea;
min-width: 24px;
box-sizing: border-box;
text-align: center;
box-shadow: 0px 2px 0px 1px #cecece;
}
</style>
</head>
<body>
<div id="container">
<div id="gamecontainer"></div>
<div id="gameControls">
<span title="Move left">←</span>
<span title="Rotate">↑</span>
<span title="Move down">↓</span>
<span title="Move right">→</span>
<span title="Drop">SPACE</span>
<span title="Pause">P</span>
</div>
</div>
<script type="text/javascript" src="dist/pacman.js"></script>
</body>
</html>