-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloader.css
More file actions
92 lines (88 loc) · 2.07 KB
/
loader.css
File metadata and controls
92 lines (88 loc) · 2.07 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
.loader__wrap {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
z-index: 1;
background-color: #2c294f;
}
.loader {
--sz: 7rem;
width: calc(var(--sz) * 2);
height: var(--sz);
margin: auto;
display: flex;
justify-content: space-evenly;
}
.loader__sq {
--p-sz: calc(var(--sz) / 4);
--m-offset: calc((var(--p-sz) * -1) * 0.75);
position: relative;
display: flex;
align-items: flex-end;
justify-content: space-evenly;
height: 100%;
width: 50%;
}
.loader__sq::before, .loader__sq::after {
width: var(--p-sz);
height: var(--p-sz);
content: "";
position: relative;
-webkit-transform: translateY(calc((var(--sz) - var(--p-sz)) * -1));
transform: translateY(calc((var(--sz) - var(--p-sz)) * -1));
animation: loader-box-bounce 0.5s cubic-bezier(0.3, 0.5, 0.4, 0.95) calc(var(--i) * 0.06s) infinite alternate-reverse;
}
.loader__sq:first-of-type {
margin-right: var(--m-offset);
}
.loader__sq:first-of-type::before {
--i: 1;
border: 3px solid #ff7ab5;
border-radius: 50%;
}
.loader__sq:first-of-type::after {
--i: 3;
background-color: #c643fb;
}
@supports ((-webkit-clip-path: circle()) or (clip-path: circle())) {
.loader__sq:first-of-type::after {
-webkit-clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
}
.loader__sq:nth-of-type(2)::before {
--i: 2;
border: 3px solid #ffb650;
}
.loader__sq:nth-of-type(2)::after {
--i: 4;
background-color: #2fe2dd;
border-radius: 50%;
}
@supports ((-webkit-clip-path: circle()) or (clip-path: circle())) {
.loader__sq:nth-of-type(2)::after {
border-radius: 0;
-webkit-clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
}
@-webkit-keyframes loader-box-bounce {
to {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes loader-box-bounce {
to {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
*,
*:before,
*:after {
box-sizing: border-box;
}