WLoading.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <svg viewBox="25 25 50 50" class="w-loading"><circle cx="50" cy="50" r="20" fill="none" stroke-width="5" stroke-miterlimit="10" class="w-path"></circle></svg>
  3. </template>
  4. <style lang="scss" scoped>
  5. .w-loading {
  6. -webkit-animation: rotate 2s linear infinite;
  7. animation: rotate 2s linear infinite;
  8. -webkit-transform-origin: center center;
  9. transform-origin: center center;
  10. width: 30px;
  11. height: 30px;
  12. max-width: 100%;
  13. max-height: 100%;
  14. margin: auto;
  15. overflow: hidden;
  16. .w-path {
  17. stroke-dasharray: 1,200;
  18. stroke-dashoffset: 0;
  19. -webkit-animation: dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite;
  20. animation: dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite;
  21. stroke-linecap: round;
  22. }
  23. }
  24. @-webkit-keyframes rotate {
  25. to {
  26. -webkit-transform: rotate(1turn);
  27. transform: rotate(1turn)
  28. }
  29. }
  30. @keyframes rotate {
  31. to {
  32. -webkit-transform: rotate(1turn);
  33. transform: rotate(1turn)
  34. }
  35. }
  36. @-webkit-keyframes dash {
  37. 0% {
  38. stroke-dasharray: 1,200;
  39. stroke-dashoffset: 0
  40. }
  41. 50% {
  42. stroke-dasharray: 89,200;
  43. stroke-dashoffset: -35
  44. }
  45. to {
  46. stroke-dasharray: 89,200;
  47. stroke-dashoffset: -124
  48. }
  49. }
  50. @keyframes dash {
  51. 0% {
  52. stroke-dasharray: 1,200;
  53. stroke-dashoffset: 0
  54. }
  55. 50% {
  56. stroke-dasharray: 89,200;
  57. stroke-dashoffset: -35
  58. }
  59. to {
  60. stroke-dasharray: 89,200;
  61. stroke-dashoffset: -124
  62. }
  63. }
  64. @-webkit-keyframes color {
  65. 0%,to {
  66. stroke: #d62d20
  67. }
  68. 40% {
  69. stroke: #0057e7
  70. }
  71. 66% {
  72. stroke: #008744
  73. }
  74. 80%,90% {
  75. stroke: #ffa700
  76. }
  77. }
  78. @keyframes color {
  79. 0%,to {
  80. stroke: #d62d20
  81. }
  82. 40% {
  83. stroke: #0057e7
  84. }
  85. 66% {
  86. stroke: #008744
  87. }
  88. 80%,90% {
  89. stroke: #ffa700
  90. }
  91. }
  92. </style>
  93. <script>
  94. export default {
  95. name: 'WLoading',
  96. }
  97. </script>