-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcar.css
More file actions
56 lines (50 loc) · 1004 Bytes
/
car.css
File metadata and controls
56 lines (50 loc) · 1004 Bytes
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
body {
background-color: #ffccff;
margin: 0;
padding: 0;
font-family: 'Arial', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.game-container {
position: relative;
width: 300px;
height: 600px;
border: 5px solid #ff66b2;
overflow: hidden;
background-color: #ff99cc;
}
#road {
position: relative;
width: 100%;
height: 100%;
background-color: #ffccff;
overflow: hidden;
}
#car {
position: absolute;
width: 40px;
height: 80px;
background-color: #ff66b2;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
border-radius: 10px;
}
.obstacle {
position: absolute;
width: 40px;
height: 80px;
background-color: #ff3366;
border-radius: 10px;
left: 50%;
transform: translateX(-50%);
}
.obstacle:nth-child(2) {
top: -80px;
}
.obstacle:nth-child(3) {
top: -160px;
}