-
Notifications
You must be signed in to change notification settings - Fork 70
/
loader.css
183 lines (159 loc) · 4.96 KB
/
loader.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/* Custom styles starts here */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@600&display=swap');
.custom_loader_wrap * {
box-sizing: border-box;
}
.custom_loader_wrap {
overflow: auto; /* location bar hack */
overflow-x: hidden;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: 0;
user-select: none;
-webkit-user-select: none;
pointer-events: all;
box-sizing: border-box;
font-family: 'Lato', sans-serif;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--cl-background);
/*
** You can modify these custom properties to change how the loader looks on the front end.
** And if the style you're looking for is not listed here,
** or, if you require a completely different custom loader,
** you can always contact us at support@awe.media
*/
/* 1. page background color */
--cl-background: #FFD399;
/* 2. cube border color */
--cl-cube-border-color: white;
/* 3. cube width, width from 15vmin to 30vmin will look great */
--cl-cube-width: 25vmin;
/* 4. border width (1/10 of cube width) */
--cl-cube-border-width: calc(var(--cl-cube-width) / 10);
/* 5. cube background color */
--cl-cube-background: rgba(242, 119, 119, .5);
/* 6. text color */
--cl-text-color: rgba(242, 119, 119, 1);
/* 7. text font size */
--cl-text-font-size: 1rem;
/* 8. text font weight */
--cl-text-font-weight: 600;
}
.custom_loader_inner_wrap {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
}
.custom_loader_cube,
.custom_loader_cube * {
position: absolute;
width: calc(var(--cl-cube-width) + 1px);
height: calc(var(--cl-cube-width) + 1px);
}
.custom_loader_sides {
transform-style: preserve-3d;
transform: rotateX(-37.5deg) rotateY(45deg);
animation: sides_rotate 3s ease infinite;
animation-delay: 0.8s;
}
@keyframes sides_rotate {
0% {
transform: rotateX(-37.5deg) rotateY(45deg);
}
50% {
transform: rotateX(-37.5deg) rotateY(405deg);
}
100% {
transform: rotateX(-37.5deg) rotateY(405deg);
}
}
.custom_loader_sides * {
background-color: var(--cl-cube-background);
border: var(--cl-cube-border-width) solid var(--cl-cube-border-color);
transform-origin: 50% 50%;
}
.custom_loader_text {
margin-top: calc(var(--cl-cube-width) * 3.5);
color: var(--cl-text-color);
font-size: var(--cl-text-font-size);
font-weight: var(--cl-text-font-weight);
width: 100%;
text-align: center;
}
.cube_top {
--cube-animate-delay: 0;
--cube-rotate-x: 90deg;
--cube-rotate-y: 0;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
animation: 3s ease infinite forwards cube_animate;
animation-delay: var(--cube-animate-delay);
}
.cube_bottom {
--cube-animate-delay: 0;
--cube-rotate-x: -90deg;
--cube-rotate-y: 0;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
animation: 3s ease infinite forwards cube_animate;
animation-delay: var(--cube-animate-delay);
}
.cube_front {
--cube-animate-delay: 0.1s;
--cube-rotate-y: 0deg;
--cube-rotate-x: 0;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
animation: 3s ease infinite forwards cube_animate;
animation-delay: var(--cube-animate-delay);
}
.cube_back {
--cube-animate-delay: 0.1s;
--cube-rotate-y: -180deg;
--cube-rotate-x: 0;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
animation: 3s ease infinite forwards cube_animate;
animation-delay: var(--cube-animate-delay);
}
.cube_left {
--cube-animate-delay: 0.1s;
--cube-rotate-y: -90deg;
--cube-rotate-x: 0;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
animation: 3s ease infinite forwards cube_animate;
animation-delay: var(--cube-animate-delay);
}
.cube_right {
--cube-animate-delay: 0.1s;
--cube-rotate-y: 90deg;
--cube-rotate-x: 0;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
animation: 3s ease infinite forwards cube_animate;
animation-delay: var(--cube-animate-delay);
}
@keyframes cube_animate {
0% {
opacity: 1;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
}
20% {
opacity: 1;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(calc(var(--cl-cube-width) / 2));
}
70% {
opacity: 1;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(calc(var(--cl-cube-width) / 2));
}
90% {
opacity: 1;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
}
100% {
opacity: 1;
transform: rotateX(var(--cube-rotate-x)) rotateY(var(--cube-rotate-y)) translateZ(var(--cl-cube-width));
}
}