-
Notifications
You must be signed in to change notification settings - Fork 14
/
4.html
77 lines (77 loc) · 1.52 KB
/
4.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
<html>
<head>
<style>
.vehicle{
position:relative;
left:0%; top:30%;
width:300px; height:100px;
border-radius:20%;
background:blue;
display:block;
margin:0;
animation-name:bus;
animation-duration:4s;
}
.wheel1{
position:relative;
left:0%; top:25%;
width:50px; height:50px;
border-radius:50%;
background:grey;
border:5px solid black;
display:block;
margin:0;
animation-name:bus;
animation-duration:4s;
}
.wheel2{
position:absolute;
width:50px; height:50px;
border-radius:50%;
border:5px solid black;
background:grey;
display:block;
margin:100 0 0 180;
animation-name:bus;
animation-duration:4s;
}
@keyframes bus{0%{left:0%;}
25%{left:50px;}
50%{left:100px;}
75%{left:50px;}
100%{left:0px;}
}
.road{
position:fixed;
left:0%;z-index:0;
width:500px; height:20px;
margin:160 0 0 10;
background:maroon;}
.signal{
position:fixed;
left:0%;z-index:0;
width:20px; height:250px;
margin:-85 0 0 400;
background:black;
}
.l1{
position:fixed;
width:60px; height:60px;
border-radius:50%;
margin:-75 0 0 370;
background-color:grey;
animation:signal 1s infinite;
}
@keyframes signal{0%{background-color:grey;}
50%{background-color:red;}
100%{background-color:grey;}}
</style>
</head>
<body>
<div class="vehicle"><h2 align="center">Bus</h2>
</div><div class="wheel1"></div><div class="wheel2"></div>
<figure class="road"></figure>
<div name="signal"><figure class="signal"></figure>
<figure class="l1"></figure>
</div></body>
</html>