-
Notifications
You must be signed in to change notification settings - Fork 11
/
styles.css
81 lines (80 loc) · 2.39 KB
/
styles.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
*{margin: 0; padding: 0; font-family: 'Josefin Sans', sans-serif;}
.hide{display: none;}
.carGame{
width: 100%;
height: 100vh;
background-image: url('assets/images/bg.jpg');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.car, .enemyCar{
width: 50px;
height: 70px;
background: red;
position: absolute;
bottom: 120px;
background-image: url('assets/images/car.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.roadLines{
width: 10px;
height: 100px;
position: absolute;
background: white;
margin-left: 195px; /* show line in center = (gameArea.width / 2) - (roadLines.width / 2) */
}
.gameArea{
width: 400px;
height: 100vh;
background: #2d3436;
margin: auto;
position: relative;
overflow: hidden;
border-right: 7px dashed #c8d6e5;
border-left: 7px dashed #c8d6e5;
}
.score{
position: absolute;
top: 15px;
left: 40px;
background: #10ac84;
width: 300px;
line-height: 70px;
text-align: center;
color: white;
font-size: 1.5em;
box-shadow: 0 5px 5px #777;
}
.startScreen{
position: absolute;
background-color: #ee5253;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: white;
z-index: 1;
text-align: center;
border: 1px solid #ff6b6b;
padding: 15px;
margin: auto;
width: 50%;
cursor: pointer;
letter-spacing: 5;
font-size: 20px;
word-spacing: 3;
line-height: 30px;
text-transform: uppercase;
box-shadow: 0 5px 5px #777;
}
.level button {
padding: 7px;
font-size: 14px;
background: white;
border: 1px solid orangered;
border-radius: 10px;
width: 80px;
cursor: pointer;
outline: none;
box-shadow: 0 5px 5px #777777a6;
}