Added game and modified index.html and added images in assest · AnIkeT126/30DaysOfJavaScript@8a3f570 · GitHub
Skip to content

Commit 8a3f570

Browse files
Added game and modified index.html and added images in assest
1 parent ecf63e8 commit 8a3f570

6 files changed

Lines changed: 201 additions & 0 deletions

File tree

‎30DaysOfJavaScript/assets/57.JPG‎

48.5 KB
Loading

‎57- Car Game/app.js‎

Lines changed: 127 additions & 0 deletions

‎57- Car Game/car.jpg‎

61.3 KB
Loading

‎57- Car Game/index.html‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Document</title>
8+
<link rel="stylesheet" href="style.css" />
9+
</head>
10+
<body>
11+
<div class="container">
12+
<div class="road"></div>
13+
</div>
14+
15+
<script src="app.js"></script>
16+
</body>
17+
</html>

‎57- Car Game/style.css‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
*{
2+
margin: 0;
3+
padding: 0;
4+
}
5+
6+
.container{
7+
background-color: rgb(118, 189, 159);
8+
background-size: cover;
9+
10+
}
11+
12+
.road{
13+
background-color: black;
14+
height: 100vh;
15+
width: 400px;
16+
margin: auto;
17+
position: relative;
18+
border-left: 5px white dashed;
19+
border-right: 5px white dashed;
20+
21+
}
22+
23+
.lines {
24+
background-color: white;
25+
height: 100px;
26+
width: 10px;
27+
position: absolute;
28+
margin-left: 195px;
29+
}
30+
31+
.car {
32+
height: 90px;
33+
width: 50px;
34+
position: absolute;
35+
background-color: blueviolet;
36+
background-image: url("car.jpg");
37+
background-size: contain;
38+
bottom:120px;
39+
}
40+
41+
.enemies {
42+
height: 90px;
43+
width: 50px;
44+
position: absolute;
45+
background-color: rgb(223, 27, 27);
46+
/* background-image: url("car.jpg"); */
47+
/* background-size: contain; */
48+
bottom:120px;
49+
}

‎index.html‎

Lines changed: 8 additions & 0 deletions

0 commit comments

Comments
 (0)