-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimation.html
More file actions
119 lines (101 loc) · 2.54 KB
/
Animation.html
File metadata and controls
119 lines (101 loc) · 2.54 KB
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>Animation</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container{
width: 100vw;
height:100vh ;
background-color: beige;
border: 5px solid black;
}
.box{
width: 250px;
height: 50px;
background-color: blue;
border-radius: 10px;
margin: 10px;
position: relative;
border: 3 px solid brown;
animation: 5s ease-in 1s infinite alternate none running rightMovement;
}
@keyframes rightMovement{
from {
top: 0;
left: 0;
}
to {
top: 0;
left: 1200px;
}
}
#box2{
width: 250px;
height: 50px;
background-color: blue;
border: 3 px solid brown;
border-radius: 10px;
margin: 10px;
position: relative;
animation: 5s ease-in 1s infinite alternate none running leftMovement;
}
@keyframes leftMovement{
from {
top: 580px;
left: 1350px;
}
to {
top: 580px;
left: 0px;
}
}
#circle{
width: 90px;
height: 90px;
background-color: blue;
border: 3 px solid brown;
border-radius: 50px;
margin: 10px;
position: relative;
top: 30%;
left: 675px;
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>