index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div class="area">
  3. <ul class="circles">
  4. <li></li>
  5. <li></li>
  6. <li></li>
  7. <li></li>
  8. <li></li>
  9. <li></li>
  10. <li></li>
  11. <li></li>
  12. <li></li>
  13. <li></li>
  14. </ul>
  15. </div>
  16. </template>
  17. <script>
  18. export default {}
  19. </script>
  20. <style scoped lang="scss">
  21. .area {
  22. @include themify($themes) {
  23. background: themed('cover-color');
  24. }
  25. width: 100%;
  26. height: 100%;
  27. }
  28. .circles {
  29. position: absolute;
  30. top: 0;
  31. left: 0;
  32. width: 100%;
  33. height: 100%;
  34. overflow: hidden;
  35. li {
  36. position: absolute;
  37. display: block;
  38. list-style: none;
  39. width: 20px;
  40. height: 20px;
  41. background: rgba(255, 255, 255, 0.2);
  42. animation: animate 25s linear infinite;
  43. bottom: -150px;
  44. }
  45. li:nth-child(1) {
  46. left: 25%;
  47. width: 80px;
  48. height: 80px;
  49. animation-delay: 0s;
  50. }
  51. li:nth-child(2) {
  52. left: 10%;
  53. width: 20px;
  54. height: 20px;
  55. animation-delay: 2s;
  56. animation-duration: 12s;
  57. }
  58. li:nth-child(3) {
  59. left: 70%;
  60. width: 20px;
  61. height: 20px;
  62. animation-delay: 4s;
  63. }
  64. li:nth-child(4) {
  65. left: 40%;
  66. width: 60px;
  67. height: 60px;
  68. animation-delay: 0s;
  69. animation-duration: 18s;
  70. }
  71. li:nth-child(5) {
  72. left: 65%;
  73. width: 20px;
  74. height: 20px;
  75. animation-delay: 0s;
  76. }
  77. li:nth-child(6) {
  78. left: 75%;
  79. width: 110px;
  80. height: 110px;
  81. animation-delay: 3s;
  82. }
  83. li:nth-child(7) {
  84. left: 35%;
  85. width: 150px;
  86. height: 150px;
  87. animation-delay: 7s;
  88. }
  89. li:nth-child(8) {
  90. left: 50%;
  91. width: 25px;
  92. height: 25px;
  93. animation-delay: 15s;
  94. animation-duration: 45s;
  95. }
  96. li:nth-child(9) {
  97. left: 20%;
  98. width: 15px;
  99. height: 15px;
  100. animation-delay: 2s;
  101. animation-duration: 35s;
  102. }
  103. li:nth-child(10) {
  104. left: 85%;
  105. width: 150px;
  106. height: 150px;
  107. animation-delay: 0s;
  108. animation-duration: 11s;
  109. }
  110. }
  111. @keyframes animate {
  112. 0% {
  113. transform: translateY(0) rotate(0deg);
  114. opacity: 1;
  115. border-radius: 0;
  116. }
  117. 100% {
  118. transform: translateY(-1000px) rotate(720deg);
  119. opacity: 0;
  120. border-radius: 50%;
  121. }
  122. }
  123. </style>