-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
115 lines (102 loc) · 2.38 KB
/
style.css
File metadata and controls
115 lines (102 loc) · 2.38 KB
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
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 62.5%;
font-family: 'Poppins', sans-serif;
}
body {
background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.5)), url(/car-game-bg-image.jpg);
background-size: cover;
background-repeat: no-repeat;
}
.hide {
display: none;
}
.car-game {
width: 100vw;
height: 100vh;
display: flex;
position: relative;
}
.score {
width: 20vw;
height: 7rem;
padding: 1.5rem;
background-color: rgb(89, 172, 89);
margin: 3rem 0 0 3rem;
font-size: 3rem;
color: white;
text-transform: capitalize;
text-align: center;
border: 2px solid pink;
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}
.score .high-score{
font-size: 2.3rem;
color: rgb(209, 234, 255);
}
.game-area {
margin: 0 15rem;
width: 58rem;
height: 100vh;
background-color: #2d3436;
overflow: hidden;
position: relative;
border-right: 0.7rem dashed white;
border-left: 0.7rem dashed white;
}
.road-line {
position: absolute;
top: 5rem;
left: 29rem;
width: 1.5rem;
height: 10rem;
background-color: white;
}
.car-div,
.enemy-car-div {
position: absolute;
bottom: 3rem;
width: 5rem;
height: 7rem;
background-repeat: no-repeat;
background-size: cover;
}
.car-div{
background-color: red;
border: 0.3rem solid goldenrod;
}
.enemy-car-div {
background-color: aquamarine;
border: 2px solid silver;
}
.start-screen, .pause-screen {
position: absolute;
top: 10rem;
left: 40rem;
width: 50vw;
padding: 2rem;
font-size: 2rem;
text-align: center;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 0.3rem;
word-spacing: 0.7rem;
margin: 0 auto;
margin-top: 15rem;
background-color: rgb(225, 75, 75);
color: white;
cursor: pointer;
z-index: 1;
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}
.pause-screen{
width: 40rem;
top: 15rem;
left: 10rem;
z-index: 10000000;
}