-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspace.html
40 lines (40 loc) · 1.59 KB
/
space.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>space invadors</title>
<style>
*{margin:0;padding:0}
#container{
width:1024px;height: 550px;background-color: black;margin:50px auto 0;position:relative;
}
#score{position: absolute;top:0;left:0;color:white;}
#startGame{
width: 80px;height: 40px;background-color: gray;line-height: 40px; text-align: center;margin:0 auto;
position:relative;top:250px;cursor:pointer;
}
#bee{
position:absolute; top:25px;
}
#bee li{ float:left;list-style-type: none ; margin:1px;}
.e1{background-image:url('icon.png') ;background-size:100% 100%;width: 20px;height: 20px}
.e2{background-image:url('icon.png') ;background-size:100% 100% ;width: 20px;height: 20px}
.e3{width: 20px;height: 20px}
#plane{background-color: blue;height: 5px;width:80px; position:absolute ; }
.bullet{width:1px;height: 5px;position:absolute;background-color: white}
#gameOver{position: absolute;z-index: 2009;left:450px;top:250px ; padding:20px; background-color: yellow ;display: none}
#gameOver button{margin: 10px 30px}
</style>
<script src="game.js" tyoe="text/javascript"></script>
</head>
<body>
<div id="container">
<div id="score">score:<span>0</span></div>
<div id="startGame">Start game!</div>
<div id = "gameOver">
<div>Game over !!!!</div>
<button value="OK" onclick="restart()">restart</button>
</div>
</div>
</body>
</html>