loading.wxss 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* templates/loading/loading.wxss */
  2. .loading {
  3. position: fixed;
  4. top: 0;
  5. left: 0;
  6. width: 100%;
  7. height: 100%;
  8. background: #fff;
  9. display: flex;
  10. flex-direction: column;
  11. justify-content: center;
  12. align-items: center;
  13. }
  14. .loading-img {
  15. margin: 50rpx auto;
  16. width: 60%;
  17. position: relative;
  18. }
  19. .loading-img::after {
  20. content: "";
  21. position: absolute;
  22. bottom: 0;
  23. left: 0;
  24. height: 6rpx;
  25. width: 10%;
  26. background: #999;
  27. border-radius: 20rpx;
  28. animation: line 2s infinite ease-in-out;
  29. }
  30. .loading-img image {
  31. width: 162rpx;
  32. height: 171rpx;
  33. animation: loading 2s infinite ease-in-out;
  34. }
  35. .loading-text {
  36. color: #666;
  37. font-weight: 600;
  38. }
  39. @keyframes loading {
  40. 10% {
  41. transform: translateX(10%)
  42. }
  43. 50% {
  44. transform: translateX(250%)
  45. }
  46. 70% {
  47. transform: translateX(250%) rotate(180deg)
  48. }
  49. 90% {
  50. transform: translateX(10%) rotate(180deg)
  51. }
  52. 100% {
  53. transform: translateX(10%) rotate(0deg)
  54. }
  55. }
  56. @keyframes line {
  57. 10% {
  58. width: 10%;
  59. }
  60. 50%, 70% {
  61. width: 98%;
  62. }
  63. 90%, 100% {
  64. width: 10%;
  65. }
  66. }