|
1 | | -.loading-bubbles{ |
| 1 | +.loading-bubbles { |
2 | 2 | @size: 1px; |
3 | 3 | @radius: 12px; |
4 | | - @shallow: .4px; |
5 | | - @c-base: #666; |
6 | | - position: relative; |
7 | | - &:before{ |
8 | | - content: ''; |
9 | | - position: absolute; |
10 | | - left: 50%; |
11 | | - top: 50%; |
12 | | - margin-top: -@size/2; |
13 | | - margin-left: -@size/2; |
14 | | - width: @size; |
15 | | - height: @size; |
16 | | - border-radius: 50%; |
17 | | - animation: linear loading-bubbles .85s infinite; |
18 | | - } |
19 | | - @keyframes loading-bubbles{ |
20 | | - 0%{ |
21 | | - box-shadow: 0 -@radius 0 (@shallow * 1) @c-base, |
22 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 2) @c-base, |
23 | | - @radius 0 0 (@shallow * 3) @c-base, |
24 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 4) @c-base, |
25 | | - 0 @radius 0 (@shallow * 5) @c-base, |
26 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 6) @c-base, |
27 | | - -@radius 0 0 (@shallow * 7) @c-base, |
28 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 8) @c-base; |
29 | | - } |
30 | | - 12.5%{ |
31 | | - box-shadow: 0 -@radius 0 (@shallow * 8) @c-base, |
32 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 1) @c-base, |
33 | | - @radius 0 0 (@shallow * 2) @c-base, |
34 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 3) @c-base, |
35 | | - 0 @radius 0 (@shallow * 4) @c-base, |
36 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 5) @c-base, |
37 | | - -@radius 0 0 (@shallow * 6) @c-base, |
38 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 7) @c-base; |
39 | | - } |
40 | | - 25%{ |
41 | | - box-shadow: 0 -@radius 0 (@shallow * 7) @c-base, |
42 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 8) @c-base, |
43 | | - @radius 0 0 (@shallow * 1) @c-base, |
44 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 2) @c-base, |
45 | | - 0 @radius 0 (@shallow * 3) @c-base, |
46 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 4) @c-base, |
47 | | - -@radius 0 0 (@shallow * 5) @c-base, |
48 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 6) @c-base; |
49 | | - } |
50 | | - 37.5%{ |
51 | | - box-shadow: 0 -@radius 0 (@shallow * 6) @c-base, |
52 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 7) @c-base, |
53 | | - @radius 0 0 (@shallow * 8) @c-base, |
54 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 1) @c-base, |
55 | | - 0 @radius 0 (@shallow * 2) @c-base, |
56 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 3) @c-base, |
57 | | - -@radius 0 0 (@shallow * 4) @c-base, |
58 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 5) @c-base; |
59 | | - } |
60 | | - 50%{ |
61 | | - box-shadow: 0 -@radius 0 (@shallow * 5) @c-base, |
62 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 6) @c-base, |
63 | | - @radius 0 0 (@shallow * 7) @c-base, |
64 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 8) @c-base, |
65 | | - 0 @radius 0 (@shallow * 1) @c-base, |
66 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 2) @c-base, |
67 | | - -@radius 0 0 (@shallow * 3) @c-base, |
68 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 4) @c-base; |
| 4 | + @shallow: 3px; |
| 5 | + @c-basic: #666; |
| 6 | + @{deep} .bubble-item { |
| 7 | + background: @c-basic; |
| 8 | + animation: loading-bubbles linear .75s infinite; |
| 9 | + &:first-child { |
| 10 | + margin-top: -@size/2 + -@radius; |
| 11 | + margin-left: -@size/2; |
| 12 | + } |
| 13 | + &:nth-child(2) { |
| 14 | + margin-top: -@size/2 + -@radius * .73; |
| 15 | + margin-left: -@size/2 + @radius * .73; |
| 16 | + } |
| 17 | + &:nth-child(3) { |
| 18 | + margin-top: -@size/2; |
| 19 | + margin-left: -@size/2 + @radius; |
| 20 | + } |
| 21 | + &:nth-child(4) { |
| 22 | + margin-top: -@size/2 + @radius * .73; |
| 23 | + margin-left: -@size/2 + @radius * .73; |
| 24 | + } |
| 25 | + &:nth-child(5) { |
| 26 | + margin-top: -@size/2 + @radius; |
| 27 | + margin-left: -@size/2; |
| 28 | + } |
| 29 | + &:nth-child(6) { |
| 30 | + margin-top: -@size/2 + @radius * .73; |
| 31 | + margin-left: -@size/2 + -@radius * .73; |
| 32 | + } |
| 33 | + &:nth-child(7) { |
| 34 | + margin-top: -@size/2; |
| 35 | + margin-left: -@size/2 + -@radius; |
| 36 | + } |
| 37 | + &:last-child { |
| 38 | + margin-top: -@size/2 + -@radius * .73; |
| 39 | + margin-left: -@size/2 + -@radius * .73; |
69 | 40 | } |
70 | | - 62.5%{ |
71 | | - box-shadow: 0 -@radius 0 (@shallow * 4) @c-base, |
72 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 5) @c-base, |
73 | | - @radius 0 0 (@shallow * 6) @c-base, |
74 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 7) @c-base, |
75 | | - 0 @radius 0 (@shallow * 8) @c-base, |
76 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 1) @c-base, |
77 | | - -@radius 0 0 (@shallow * 2) @c-base, |
78 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 3) @c-base; |
79 | | - } |
80 | | - 75%{ |
81 | | - box-shadow: 0 -@radius 0 (@shallow * 3) @c-base, |
82 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 4) @c-base, |
83 | | - @radius 0 0 (@shallow * 5) @c-base, |
84 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 6) @c-base, |
85 | | - 0 @radius 0 (@shallow * 7) @c-base, |
86 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 8) @c-base, |
87 | | - -@radius 0 0 (@shallow * 1) @c-base, |
88 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 2) @c-base; |
89 | | - } |
90 | | - 87.5%{ |
91 | | - box-shadow: 0 -@radius 0 (@shallow * 2) @c-base, |
92 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 3) @c-base, |
93 | | - @radius 0 0 (@shallow * 4) @c-base, |
94 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 5) @c-base, |
95 | | - 0 @radius 0 (@shallow * 6) @c-base, |
96 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 7) @c-base, |
97 | | - -@radius 0 0 (@shallow * 8) @c-base, |
98 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 1) @c-base; |
99 | | - } |
100 | | - 100%{ |
101 | | - box-shadow: 0 -@radius 0 (@shallow * 1) @c-base, |
102 | | - @radius * 0.71 -@radius * 0.71 0 (@shallow * 2) @c-base, |
103 | | - @radius 0 0 (@shallow * 3) @c-base, |
104 | | - @radius * 0.71 @radius * 0.71 0 (@shallow * 4) @c-base, |
105 | | - 0 @radius 0 (@shallow * 5) @c-base, |
106 | | - -@radius * 0.71 @radius * 0.71 0 (@shallow * 6) @c-base, |
107 | | - -@radius 0 0 (@shallow * 7) @c-base, |
108 | | - -@radius * 0.71 -@radius * 0.71 0 (@shallow * 8) @c-base; |
| 41 | + } |
| 42 | + @keyframes loading-bubbles { |
| 43 | + 0% { |
| 44 | + width: @size; |
| 45 | + height: @size; |
| 46 | + box-shadow: 0 0 0 @shallow @c-basic; |
| 47 | + } |
| 48 | + 90% { |
| 49 | + width: @size; |
| 50 | + height: @size; |
| 51 | + box-shadow: 0 0 0 0 @c-basic; |
| 52 | + } |
| 53 | + 100% { |
| 54 | + width: @size; |
| 55 | + height: @size; |
| 56 | + box-shadow: 0 0 0 @shallow @c-basic; |
109 | 57 | } |
110 | 58 | } |
111 | 59 | } |
0 commit comments