-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanimation.css
More file actions
80 lines (65 loc) · 1.08 KB
/
animation.css
File metadata and controls
80 lines (65 loc) · 1.08 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
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
min-height: 100vh;
background: radial-gradient(orange,red);
display: flex;
align-items: center;
justify-content: center;
}
p{
font-size: 150px;
margin-left: 50px;
font-style: italic;
}
.cont{
position: relative;
width: 400px;
height: 400px;
display: flex;
justify-content: center;
align-items: center;
transform-style: preserve-3d;;
transform : perspective(500px) rotateX(135deg);
}
.cont span{
position: absolute;
display: block;
border: 12px solid purple;
border-radius: 50%;
animation: animate 6s ease-in-out infinite;
box-shadow: 0 10px 0 #efebed,
inset 0 10px 0 #ececec;
animation-delay: calc(-1s*var(--i));
}
@keyframes animate
{
0%{
transform: translateZ(-150px);
width: 100%;
height: 100%;
}
25%{
transform: translateZ(150px);
width: 100%;
height: 100%;
}
50%{
transform: translateZ(150px);
width: 15%;
height: 15%;
}
75%{
transform: translateZ(-150px);
width: 15%;
height: 15%;
}
100%{
transform: translateZ(-100px);
width: 100%;
height: 100%;
}
}