-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.css
114 lines (105 loc) · 1.84 KB
/
game.css
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
*{
margin:0px;
padding:0px;
}
body {
background-color:aqua;
}
#score {
position:relative;
text-align:center;
top:100px;
z-index:2;
}
#square {
position:relative;
left:200px;
top:547px;
border:none;
width:140px;
height:130px;
cursor:pointer;
z-index:1;
background-image:url(car.PNG);
background-size:140px 130px;
}
.jump {
animation:jump 0.3s linear;
}
#square2 {
position:relative;
width:40px;
height:60px;
top:450px;
left:1300px;
animation-name:gameanimation;
animation-duration:1s;
animation-iteration-count: infinite;
background-image: url(cactus.PNG);
background-size:40px 60px;
border:none;
z-index:2;
}
.square3 {
position:relative;
background-color:green;
width:1450px;
height:40px;
top:450px;
right:100px;
}
.wre {
position:relative;
background-color:whitesmoke;
bottom:180px;
left:1400px;
width:130px;
height:50px;
border-radius:70%;
animation-name:wreanimation;
animation-duration: 6s;
animation-iteration-count: infinite;
z-index:1;
}
.wre2 {
position:relative;
background-color:whitesmoke;
bottom:210px;
left:1400px;
width:130px;
height:50px;
border-radius:70%;
animation-name:wreanimation2;
animation-duration:7s;
animation-iteration-count: infinite;
z-index:1;
}
@keyframes gameanimation {
0%{left:1300px}
100%{left:-100px;}
}
@keyframes wreanimation {
0%{transform:translateX(0px);}
100%{transform:translateX(-1600px);}
}
@keyframes wreanimation2 {
0%{transform:translateX(0px);}
100%{transform:translateX(-1600px);}
}
@keyframes jump {
0%{
top:547px;
}
30%{
top:447px;
}
50%{
top:347px;
}
80%{
top:447px;
}
100% {
top:547px;
}
}