-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathindex.html
103 lines (90 loc) · 2.09 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description"
content="A Simple Spiderman Game in HTML5, CSS3 and Javascript" />
<meta name="author" content="Chandula Janith (RedEdge967)" />
<title>Spider-Man Game | A spiderman game to fight with more Villains of Spider-Man</title>
<link rel="shortcut icon" href="images/spider-head.png" />
</head>
<style type="text/css">
html,
body {
height: 100%;
width: 100%;
margin: 0;
font-size: 0;
background: #000;
}
.canvas-wrapper {
float: left;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.key {
height: 30px;
min-width: 20px;
line-height: 30px;
text-align: center;
border: 1px solid #ccc;
border-bottom: 3px solid #bbb;
background: white;
display: inline-block;
padding: 0 5px;
border-radius: 5px;
box-shadow: inset 0 -1px 0 #ccc;
color: #333;
font-weight: bold;
}
.key.spacebar {
padding: 0 40px;
}
.keyboard {
margin: 5px 0;
font-size: 15px;
font-family: Helvetica;
color: white;
}
.action {
margin-right: 15px;
}
.link {
width: 100%;
text-align: center;
font-size: 20px;
color: #ccc;
font-family: SpidermanGamePixelFont, Helvetica, Arial;
margin-top: 20px;
}
</style>
<body>
<div class="canvas-wrapper">
<div class="keyboard">
<div class="key spacebar">Spacebar</div>
<span class="action">- Shoot</span>
<div class="key">←</div>
<div class="key">→</div>
<span class="action">- Left/Right</span>
<div class="key">↑</div>
<span class="action">- Jump</span>
<div class="key">Esc</div>
<span class="action">- Pause</span>
</div>
<canvas id="canvas"></canvas>
</div>
</body>
<script type="text/javascript" src="spiderman-game.js"></script>
<script type="text/javascript">
var game = new SpidermanGame({
canvas: "#canvas"
});
game.load();
</script>
</html>