index.scss
2.29 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
120
121
122
123
124
125
126
.zui-loading {
color: $color-minor;
display: inline-flex;
align-items: center;
justify-content: center;
&__spinner {
position: relative;
display: inline-block;
width: 50upx;
max-width: 100%;
height: 50upx;
max-height: 100%;
vertical-align: middle;
animation: zui-rotate 0.8s linear infinite;
&--spinner {
animation-timing-function: steps(12);
.zui-loading__dot {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
&::before {
display: block;
width: 2upx;
height: 25%;
margin: 0 auto;
background-color: currentColor;
border-radius: 40%;
content: ' ';
}
&:nth-of-type(1) {
transform: rotate(30deg);
opacity: 1;
}
&:nth-of-type(2) {
transform: rotate(60deg);
opacity: 0.9375;
}
&:nth-of-type(3) {
transform: rotate(90deg);
opacity: 0.875;
}
&:nth-of-type(4) {
transform: rotate(120deg);
opacity: 0.8125;
}
&:nth-of-type(5) {
transform: rotate(150deg);
opacity: 0.75;
}
&:nth-of-type(6) {
transform: rotate(180deg);
opacity: 0.6875;
}
&:nth-of-type(7) {
transform: rotate(210deg);
opacity: 0.625;
}
&:nth-of-type(8) {
transform: rotate(240deg);
opacity: 0.5625;
}
&:nth-of-type(9) {
transform: rotate(270deg);
opacity: 0.5;
}
&:nth-of-type(10) {
transform: rotate(300deg);
opacity: 0.4375;
}
&:nth-of-type(11) {
transform: rotate(330deg);
opacity: 0.375;
}
&:nth-of-type(12) {
transform: rotate(360deg);
opacity: 0.3125;
}
}
}
&--circular {
border: 1upx solid transparent;
border-top-color: currentColor;
border-radius: 100%;
}
}
&__text {
margin-left: $padding-sm;
color: $color-minor;
font-size: $font-md;
}
&--vertical {
flex-direction: column;
.zui-loading__text {
margin: $padding-xs 0 0;
}
}
}
@keyframes zui-circular {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -40;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -120;
}
}
@keyframes zui-rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}