_loading.scss
1.66 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
.loading-mask {
position: fixed;
background: rgba(0,0,0,.1);
top: 0;
bottom: 0;
right: 0;
left: 0;
@-webkit-keyframes scale {
0% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
45% {
-webkit-transform: scale(0.1);
transform: scale(0.1);
opacity: 0.7;
}
80% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
@keyframes scale {
0% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
45% {
-webkit-transform: scale(0.1);
transform: scale(0.1);
opacity: 0.7;
}
80% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
.loading {
position: absolute;
width: 60px;
height: 20px;
top: 50%;
left: 50%;
margin-top: -10px;
margin-left: -30px;
> div {
display: inline-block;
background: #fff;
width: 15px;
height: 15px;
@include border-radius(100%);
margin: 2px;
$init: 0.12;
@for $i from 1 through 3 {
&:nth-child(#{$i}) {
-webkit-animation: scale .75s #{$init}s infinite cubic-bezier(.2,.68,.18,1.08);
animation: scale .75s #{$init}s infinite cubic-bezier(.2,.68,.18,1.08);
}
$init: ($i + 1) * 0.12;
}
}
}
}