-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
119 lines (117 loc) · 1.98 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Car</title>
</head>
<style>
body
{
margin: 0px;
padding: 0px;
}
.sky
{
width: 100%;
height:100vh;
background-image: url(skyi.jpg);
background-position: center;
background-size: cover;
overflow: hidden;
position: relative;
}
.city
{
width: 500%;
height:450px;
background-image: url(city.png);
bottom: 0px;
left: 0px;
right: 0px;
background-repeat: repeat-x;
overflow: hidden;
position: absolute;
z-index: 1;
display: block;
animation: cities 20s linear infinite;
}
.road
{
width: 500%;
height: 200px;
background-image: url(road.jpg);
background-repeat: repeat-x;
position: absolute;
bottom: 0px;
display: block;
left: 0px;
right: 0px;
z-index: 1;
animation: cities 10s linear infinite;
}
.carr img
{
width: 400px;
position: absolute;
bottom: 100px;
display: block;
z-index: 1;
margin-left: 100px;
animation: cae 0.8s linear infinite;
}
@keyframes cae {
100%
{
transform: translateY(0.8px);
}
}
.back img
{
width: 70px;
position: relative;
margin-left: 173px;
margin-top: 480px;
z-index: 1;
animation: whee .3s linear infinite;
}
.front img
{
width: 70px;
position: relative;
margin-left: 135px;
margin-top: 479px;
z-index: 1;
animation: whee .3s linear infinite;
}
@keyframes whee
{
100%
{
transform: rotate(360deg);
}
}
@keyframes cities
{
100%
{
transform: translate(-3000px);
}
}
</style>
<body>
<div class="sky">
<div class="city"></div>
<div class="road"></div>
<div class="carr">
<img src="car.png" alt="car on road">
</div>
<div class="front" style="display: inline;">
<img src="wheel.png">
</div>
<div class="back" style="display: inline;">
<img src="wheel.png" >
</div>
</div>
</body>
</html>