forked from jakesgordon/javascript-racer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.css
128 lines (110 loc) · 2.23 KB
/
common.css
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
/****************************************/
/* common styles used for v1 through v4 */
/****************************************/
body {
font-family: Arial, Helvetica, sans-serif;
}
#stats {
border: 2px solid black;
}
#controls {
width: 28em;
float: left;
padding: 1em;
font-size: 0.7em;
}
#controls th {
text-align: right;
vertical-align: middle;
}
#instructions {
clear: left;
float: left;
width: 17em;
padding: 1em;
border: 1px solid black;
box-shadow: 0 0 5px black;
}
#racer {
position: relative;
z-index: 0;
width: 640px;
height: 480px;
margin-left: 20em;
border: 2px solid black;
}
#canvas {
position: absolute;
z-index: 0;
width: 640px;
height: 480px;
background-color: #72D7EE;
}
#mute {
background-position: 0px 0px;
width: 32px;
height: 32px;
background: url(images/mute.png);
display: inline-block;
cursor: pointer;
position: absolute;
margin-left: 20em;
}
#mute.on {
background-position: -32px 0px;
}
/**************************************************/
/* rudimentary heads up display (only used in v4) */
/**************************************************/
#hud {
position: absolute;
z-index: 1;
left: 0;
right: 0;
padding: .33em 0;
font-family: Verdana, Geneva, sans-serif;
font-size: 0.8em;
background-color: rgba(255, 255, 255, 0.4);
color: #222;
border-bottom: 1px solid rgba(0,0,0,.33);
box-sizing: border-box;
text-align: center;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
overflow: hidden;
}
#hud .hud {
background-color: rgba(255, 255, 255, 0.6);
padding: .33em;
border: 1px solid rgba(0,0,0,.33);
border-radius: .5em;
margin: 0 .33em;
transition-property: background-color;
transition-duration: 2s;
-webkit-transition-property: background-color;
-webkit-transition-duration: 2s;
}
#speed {
float: right;
}
#current_lap_time {
float: left;
}
#last_lap_time {
float: left;
display: none;
}
#fast_lap_time {
display: inline-block;
transition-property: background-color;
transition-duration: 2s;
-webkit-transition-property: background-color;
-webkit-transition-duration: 2s;
}
#hud .value {
color: #222;
font-weight: bold;
}
#hud .fastest {
background-color: rgba(255, 215, 0, 0.5);
}