-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrans-anim.css
64 lines (63 loc) · 1.27 KB
/
trans-anim.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
body{
font-family: 'Poppins', sans-serif;
padding: 0;
margin: 0;
}
.all{
position: relative;
}
.container{
height: 100px;
width: 400px;
background-color: orange;
color: white;
transition: height 2s linear 0.5s; /* property duration timing-function delay*/
animation-name: changecolor;
animation-duration: 4s;
animation-iteration-count: infinite;
}
/* .container:hover{
height: 200px;
}
@keyframes changecolor{
from {background-color: orange;}
to {background-color: black;}
} */
.box{
position: absolute;
width: 150px;
background: purple;
height: 150px;
animation-name: movemybox;
animation-duration: 2s;
/* animation-iteration-count: infinite; */
}
@keyframes movemybox{
0% {
background: white;
left: 0;
top: 0;
border-radius: 0;
}
25% {
background: red;
left: 500px;top: 0;
border-radius: 50% 0 0 0;
}
50% {
background: purple;
left: 500px;
top: 500px;
border-radius: 50% 50%;
}
75% {
background: green;
left: 0;top: 500px;
border-radius: 50% 0;
}
100% {background: khaki;
left: 0;
top: 0;
border-radius: 50% 50% 50% 0;
}
}