index.vue 2.1 KB

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