loading.vue 869 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class="bg">
  3. <div class="loader" />
  4. </div>
  5. </template>
  6. <style lang="scss" scoped>
  7. .bg{
  8. width: 100vw;
  9. height: 100vh;
  10. position: fixed;
  11. top: 0;
  12. left: 0;
  13. display: flex;
  14. align-items: center;
  15. justify-content: center;
  16. background: rgba(0, 0, 0, 0.5);
  17. }
  18. .loader {
  19. border: 5px solid #f3f3f3;
  20. border-radius: 50%;
  21. border-top: 5px solid #3498db;
  22. width: 30px;
  23. height: 30px;
  24. -webkit-animation: spin 2s linear infinite;
  25. animation: spin 2s linear infinite;
  26. }
  27. @-webkit-keyframes spin {
  28. 0% { -webkit-transform: rotate(0deg); }
  29. 100% { -webkit-transform: rotate(360deg); }
  30. }
  31. @keyframes spin {
  32. 0% { transform: rotate(0deg); }
  33. 100% { transform: rotate(360deg); }
  34. }
  35. </style>