loading.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="flex">
  3. <view class="sk-folding-cube">
  4. <view class="sk-cube1 sk-cube"></view>
  5. <view class="sk-cube2 sk-cube"></view>
  6. <view class="sk-cube4 sk-cube"></view>
  7. <view class="sk-cube3 sk-cube"></view>
  8. </view>
  9. <view class="YS_title" style="margin-top: 20rpx;color: #555555;">正在加载中...</view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. name: "loading",
  15. data() {
  16. return {
  17. };
  18. }
  19. }
  20. </script>
  21. <style lang="scss">
  22. .flex {
  23. width: 100vw;
  24. height: 100vh;
  25. display: flex;
  26. flex-direction: column;
  27. align-items: center;
  28. justify-content: center;
  29. }
  30. .sk-folding-cube {
  31. margin: 20px auto;
  32. width: 40px;
  33. height: 40px;
  34. position: relative;
  35. -webkit-transform: rotateZ(45deg);
  36. transform: rotateZ(45deg);
  37. }
  38. .sk-folding-cube .sk-cube {
  39. float: left;
  40. width: 50%;
  41. height: 50%;
  42. position: relative;
  43. -webkit-transform: scale(1.1);
  44. -ms-transform: scale(1.1);
  45. transform: scale(1.1);
  46. }
  47. .sk-folding-cube .sk-cube:before {
  48. content: '';
  49. position: absolute;
  50. top: 0;
  51. left: 0;
  52. width: 100%;
  53. height: 100%;
  54. background-color: #555555;
  55. -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both;
  56. animation: sk-foldCubeAngle 2.4s infinite linear both;
  57. -webkit-transform-origin: 100% 100%;
  58. -ms-transform-origin: 100% 100%;
  59. transform-origin: 100% 100%;
  60. }
  61. .sk-folding-cube .sk-cube2 {
  62. -webkit-transform: scale(1.1) rotateZ(90deg);
  63. transform: scale(1.1) rotateZ(90deg);
  64. }
  65. .sk-folding-cube .sk-cube3 {
  66. -webkit-transform: scale(1.1) rotateZ(180deg);
  67. transform: scale(1.1) rotateZ(180deg);
  68. }
  69. .sk-folding-cube .sk-cube4 {
  70. -webkit-transform: scale(1.1) rotateZ(270deg);
  71. transform: scale(1.1) rotateZ(270deg);
  72. }
  73. .sk-folding-cube .sk-cube2:before {
  74. -webkit-animation-delay: 0.3s;
  75. animation-delay: 0.3s;
  76. }
  77. .sk-folding-cube .sk-cube3:before {
  78. -webkit-animation-delay: 0.6s;
  79. animation-delay: 0.6s;
  80. }
  81. .sk-folding-cube .sk-cube4:before {
  82. -webkit-animation-delay: 0.9s;
  83. animation-delay: 0.9s;
  84. }
  85. @-webkit-keyframes sk-foldCubeAngle {
  86. 0%,
  87. 10% {
  88. -webkit-transform: perspective(140px) rotateX(-180deg);
  89. transform: perspective(140px) rotateX(-180deg);
  90. opacity: 0;
  91. }
  92. 25%,
  93. 75% {
  94. -webkit-transform: perspective(140px) rotateX(0deg);
  95. transform: perspective(140px) rotateX(0deg);
  96. opacity: 1;
  97. }
  98. 90%,
  99. 100% {
  100. -webkit-transform: perspective(140px) rotateY(180deg);
  101. transform: perspective(140px) rotateY(180deg);
  102. opacity: 0;
  103. }
  104. }
  105. @keyframes sk-foldCubeAngle {
  106. 0%,
  107. 10% {
  108. -webkit-transform: perspective(140px) rotateX(-180deg);
  109. transform: perspective(140px) rotateX(-180deg);
  110. opacity: 0;
  111. }
  112. 25%,
  113. 75% {
  114. -webkit-transform: perspective(140px) rotateX(0deg);
  115. transform: perspective(140px) rotateX(0deg);
  116. opacity: 1;
  117. }
  118. 90%,
  119. 100% {
  120. -webkit-transform: perspective(140px) rotateY(180deg);
  121. transform: perspective(140px) rotateY(180deg);
  122. opacity: 0;
  123. }
  124. }
  125. </style>