-
Notifications
You must be signed in to change notification settings - Fork 0
/
jump.css
56 lines (51 loc) · 830 Bytes
/
jump.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
*{
padding: 0;
margin: 0;
overflow-x: hidden;
}
.game{
width: 500px;
height: 200px;
border: 1px solid black;
margin: auto;
}
#character{
width: 20px;
height: 50px;
background-color: red;
position:relative;
top: 150px;
}
.animate{
animation: jump 0.3s linear;
}
@keyframes jump{
0%{top: 150px;}
30%{top: 100px;}
70%{top: 100px;}
100%{top: 150px;}
}
#block{
background-color: blue;
width: 20px;
height: 20px;
position: relative;
top: 130px;
left: 500px;
animation: block 1s infinite linear;
}
@keyframes block{
0%{left: 500px}
100%{left: -20px}
}
footer button {
margin-top: 50px;
color: red;
border-radius: 14px;
width: 200px;
height: 70px;
border: 0px;
}
p#total_score {
text-align: center;
}