-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
148 lines (135 loc) · 2.81 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<html>
<head>
<title>A DRIVING GAME WHERE ACTUALLY YOUR CAR IS THE WORST</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Courier New", Courier, monospace;
font-size: 32px;
}
#game {
width: 800px;
height: 600px;
margin: 0 auto;
margin-top: 10px;
overflow: hidden;
position: relative;
}
#grass {
position: absolute;
top:-100;
left:0;
width: 100%;
height: 130%;
z-index: -1;
background: #018E0E;
background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.1) 50%, transparent 50%, transparent 0px), none;
background-size: auto 50px;
overflow: hidden;
}
#canvas {
position: absolute;
width: 800px;
height: 600px;
top: 0;
left: 0;
}
.lanes {
margin-left: 200px;
border-left: 2px solid #fff;
height: 100%;
}
.lanes div {
width: 80px;
height: 100%;
background: #696969;
border-right: 2px solid #fff;
float:left;
}
#score {
color:#fff;
position: absolute;
top:10px;
left:10px;
}
#speed {
color:#fff;
position: absolute;
top:30px;
left:10px;
}
#message {
z-index: 100;
position: absolute;
box-sizing: border-box;
width:100%;
height:100%;
padding:150px 200px 0;
text-align: center;
background: rgba(0,0,0,.75);
color: #fff;
}
#speedometer {
width:100px;
height:100px;
background: #fefefe;
border-radius: 50px;
position: absolute;
border:1px solid #000;
top:425px;
left:50px;
box-shadow: 5px 5px 0px rgba(0,0,0,.25);
}
#tripmeter, #tripmeter-boxes {
border:1px solid #000;
position: absolute;
width: 117px;
top:510px;
left:42px;
line-height: 33px;
}
#tripmeter {
box-shadow: 5px 5px 0px rgba(0,0,0,.25);
z-index: 1;
}
#tripmeter-boxes {
background: #fefefe;
}
#tripmeter-boxes div {
border-right: 1px solid #000;
width:19.3px;
height:33px;
float: left;
}
</style>
</head>
<body>
<div id="game">
<div id="message"></div>
<div id="grass"></div>
<div id="speedometer"></div>
<div id="tripmeter-boxes">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div id="tripmeter"></div>
<div class="lanes">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<canvas id="canvas"></canvas>
</div>
<script src="js/init.js"></script>
<script src="js/render.js"></script>
<script src="js/units.js"></script>
<script src="js/run.js"></script>
</body>
</html>