-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimation.css
109 lines (95 loc) · 2.18 KB
/
animation.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animations</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container{
width: 100vw;
height: 100vh;
background-color: beige;
border: solid 5px black;
}
.box{
width: 350px;
height: 80px;
border-radius: 10px;
background-color: blue;
margin: 10px;
border: 3px solid yellow;
position: relative;
animation: 5s linear 1s infinite alternate none running rightMovement;
}
@keyframes rightMovement{
from{top: 0px;
left: 0px;
}
to{
top: 0px;
left: 1350px;
}
}
#box2{
width: 350px;
height: 80px;
border-radius: 10px;
background-color: blue;
margin: 10px;
border: 3px solid yellow;
position: relative;
animation: 5s ease-in 1s infinite alternate none running leftMovement;
}
@keyframes leftMovement{
from{top: 650px;
left: 1350px;
}
to{
top: 650px;
left: 0px;
}
}
#circle{
width: 100px;
height: 100px;
border-radius: 50px;
background-color:blue;
margin: 10px;
border: 3px solid yellow;
position: relative;
top: 30%;
left: 40%;
animation: 10s ease-in-out 0s infinite alternate-reverse none running circlemovement;
}
@keyframes circlemovement{
0% {top: 1%;
left: 5%;
}
30% {
top: 5%;
left: 90%;
}
60% {
top: 70%;
left: 10%;
}
100% {
top: 75%;
left: 90%;
}
}
</style>
</head>
<body>
<div class="container">
<div class="box"></div>
<div id="circle"></div>
<div id="box2"> </div>
</div>
</body>
</html>