loading.scss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. @charset "utf-8";
  2. @import "./spinner/dots.css";
  3. @import "./spinner/gauge.css";
  4. @import "./spinner/inner-circles.css";
  5. @import "./spinner/plus.css";
  6. $base-loading: ".app-loading-type";
  7. /* 自定义loading开始 */
  8. #{$base-loading}1 {
  9. display: flex;
  10. width: 36px;
  11. height: 36px;
  12. margin: 0 auto 15px;
  13. border: 3px solid transparent;
  14. border-top-color: $base-color-blue;
  15. border-bottom-color: $base-color-blue;
  16. border-radius: 50%;
  17. animation: htLoading1-0 0.8s linear infinite;
  18. }
  19. #{$base-loading}1::before {
  20. display: block;
  21. width: 8px;
  22. height: 8px;
  23. margin: auto;
  24. content: "";
  25. border: 3px solid $base-color-blue;
  26. border-radius: 50%;
  27. animation: htLoading1 0.5s alternate ease-in infinite;
  28. }
  29. @keyframes htLoading1-0 {
  30. to {
  31. transform: rotate(360deg);
  32. }
  33. }
  34. @keyframes htLoading1 {
  35. from {
  36. transform: scale(0.5);
  37. }
  38. to {
  39. transform: scale(1.2);
  40. }
  41. }
  42. #{$base-loading}2 {
  43. width: 20px;
  44. height: 20px;
  45. margin-top: -40px;
  46. margin-left: -10px;
  47. animation: htLoading2 1s linear reverse infinite;
  48. }
  49. #{$base-loading}2::before {
  50. display: block;
  51. width: 36px;
  52. height: 36px;
  53. margin-top: -17px;
  54. margin-left: -18px;
  55. content: "";
  56. animation: htLoading2 0.4s linear infinite;
  57. }
  58. #{$base-loading}2::after {
  59. display: block;
  60. width: 8px;
  61. height: 8px;
  62. margin-top: -3px;
  63. margin-left: -4px;
  64. content: "";
  65. animation: htLoading2 0.4s linear infinite;
  66. }
  67. #{$base-loading}2::before,
  68. #{$base-loading}2,
  69. #{$base-loading}2::after {
  70. position: absolute;
  71. top: 40%;
  72. left: 50%;
  73. border: 3px solid transparent;
  74. border-top-color: $base-color-blue;
  75. border-right-color: $base-color-blue;
  76. border-radius: 50%;
  77. }
  78. @keyframes htLoading2 {
  79. to {
  80. transform: rotate(360deg);
  81. }
  82. }
  83. #{$base-loading}3 {
  84. display: inline-block;
  85. width: 2.5em;
  86. height: 3em;
  87. margin-bottom: 15px;
  88. border: 3px solid transparent;
  89. border-top-color: $base-color-blue;
  90. border-bottom-color: $base-color-blue;
  91. border-radius: 50%;
  92. animation: htLoading3 2s ease infinite;
  93. }
  94. @keyframes htLoading3 {
  95. 50% {
  96. border-width: 8px;
  97. transform: rotate(360deg) scale(0.4, 0.33);
  98. }
  99. 100% {
  100. border-width: 3px;
  101. transform: rotate(720deg) scale(1, 1);
  102. }
  103. }
  104. #{$base-loading}4 {
  105. display: inline-block;
  106. width: 30px;
  107. height: 30px;
  108. margin: 0 auto 10px;
  109. border: 8px solid transparent;
  110. border-bottom-color: $base-color-blue;
  111. border-left-color: $base-color-blue;
  112. border-radius: 50%;
  113. animation: htLoading4 1s linear infinite normal;
  114. }
  115. #{$base-loading}4::after {
  116. display: block;
  117. width: 15px;
  118. height: 15px;
  119. margin: 0;
  120. content: " ";
  121. border: 6px solid $base-color-blue;
  122. border-bottom-color: transparent;
  123. border-left-color: transparent;
  124. border-radius: 50%;
  125. }
  126. @keyframes htLoading4 {
  127. 0% {
  128. opacity: 0.2;
  129. transform: rotate(0deg);
  130. }
  131. 50% {
  132. opacity: 1;
  133. transform: rotate(180deg);
  134. }
  135. 100% {
  136. opacity: 0.2;
  137. transform: rotate(360deg);
  138. }
  139. }
  140. #{$base-loading}5 {
  141. display: block;
  142. width: 0;
  143. height: 0;
  144. margin: 0 auto 15px;
  145. border: solid 1.5em $base-color-blue;
  146. border-right: solid 1.5em transparent;
  147. border-left: solid 1.5em transparent;
  148. border-radius: 100%;
  149. animation: htLoading5 1s linear infinite;
  150. }
  151. @keyframes htLoading5 {
  152. 0% {
  153. transform: rotate(0deg);
  154. }
  155. 50% {
  156. transform: rotate(60deg);
  157. }
  158. 100% {
  159. transform: rotate(360deg);
  160. }
  161. }
  162. #{$base-loading}6 {
  163. display: block;
  164. width: 0;
  165. height: 0;
  166. margin: 0 auto 25px auto;
  167. perspective: 200px;
  168. }
  169. #{$base-loading}6::before,
  170. #{$base-loading}6::after {
  171. position: absolute;
  172. width: 20px;
  173. height: 20px;
  174. content: "";
  175. background: rgba(0, 0, 0, 0);
  176. animation: htLoading6 0.5s infinite alternate;
  177. }
  178. #{$base-loading}6::before {
  179. left: 0;
  180. }
  181. #{$base-loading}6::after {
  182. right: 0;
  183. animation-delay: 0.15s;
  184. }
  185. @keyframes htLoading6 {
  186. 0% {
  187. box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  188. transform: scale(1) translateY(0) rotateX(0deg);
  189. }
  190. 100% {
  191. background: $base-color-blue;
  192. box-shadow: 0 25px 40px rgba($base-color-blue, 0.5);
  193. transform: scale(1.2) translateY(-25px) rotateX(45deg);
  194. }
  195. }
  196. #{$base-loading}7 {
  197. display: block;
  198. width: 25px;
  199. height: 25px;
  200. margin: 0 auto 15px auto;
  201. border: 2px solid $base-color-blue;
  202. border-top-color: rgba($base-color-blue, 0.2);
  203. border-right-color: rgba($base-color-blue, 0.2);
  204. border-bottom-color: rgba($base-color-blue, 0.2);
  205. border-radius: 100%;
  206. animation: htLoading7 infinite 0.75s linear;
  207. }
  208. @keyframes htLoading7 {
  209. 0% {
  210. transform: rotate(0);
  211. }
  212. 100% {
  213. transform: rotate(360deg);
  214. }
  215. }
  216. #{$base-loading}8 {
  217. position: relative;
  218. box-sizing: border-box;
  219. display: block;
  220. width: 20px;
  221. height: 20px;
  222. margin: 0 auto 15px auto;
  223. background-color: $base-color-blue;
  224. border-radius: 50%;
  225. box-shadow: 30px 0 0 0 $base-color-blue;
  226. transform: translateX(-15px);
  227. }
  228. #{$base-loading}8::after {
  229. position: absolute;
  230. top: 8px;
  231. left: 9px;
  232. width: 10px;
  233. height: 10px;
  234. content: "";
  235. background-color: $base-color-white;
  236. border-radius: 50%;
  237. box-shadow: 30px 0 0 0 $base-color-white;
  238. animation: htLoading8 2s ease-in-out infinite alternate;
  239. }
  240. @keyframes htLoading8 {
  241. 0% {
  242. left: 9px;
  243. }
  244. 100% {
  245. left: 1px;
  246. }
  247. }
  248. #{$base-loading}9 {
  249. position: relative;
  250. box-sizing: border-box;
  251. display: block;
  252. width: 20px;
  253. height: 20px;
  254. margin: 0 auto 15px auto;
  255. border: 1px $base-color-blue solid;
  256. animation: htLoading9 5s linear infinite;
  257. }
  258. #{$base-loading}9::after {
  259. position: absolute;
  260. top: -8px;
  261. left: 0;
  262. width: 4px;
  263. height: 4px;
  264. content: "";
  265. background-color: $base-color-blue;
  266. animation: htLoading9_check 1s ease-in-out infinite;
  267. }
  268. @keyframes htLoading9_check {
  269. 25% {
  270. top: -8px;
  271. left: 22px;
  272. }
  273. 50% {
  274. top: 22px;
  275. left: 22px;
  276. }
  277. 75% {
  278. top: 22px;
  279. left: -9px;
  280. }
  281. 100% {
  282. top: -7px;
  283. left: -9px;
  284. }
  285. }
  286. @keyframes htLoading9 {
  287. 0% {
  288. box-shadow: inset 0 0 0 0 rgba($base-color-blue, 0.5);
  289. opacity: 0.5;
  290. }
  291. 100% {
  292. box-shadow: inset 0 -20px 0 0 $base-color-blue;
  293. }
  294. }
  295. /* 自定义loading结束 */