zhuguifei
2025-06-17 c1cc49dd93d38f51790558541d6835d1598ecccf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<script setup lang="ts">
import { onBeforeMount } from 'vue';
 
 
const list = new Array(15).fill(0);
 
onBeforeMount(() => {
  document.styleSheets[0].insertRule(`@keyframes bubbleMoveToTop{ 90% {
      opacity: 1;
    }
    100% {
      opacity: 0.1;
      transform: translate(-50%, -260px);
    }}`);
})
</script>
 
<template>
  <div style="width: 100%">
    <div class="container">
      <div class="number">正在检测</div>
      <div class="contrast">
        <div class="circle"></div>
        <ul class="bubbles">
          <li v-for="(_, index) in list" :key="index"
            :style="{ width: `${Math.random() * 15 + 15}px`, height: `${Math.random() * 15 + 15}px`, left: `${Math.random() * 70 + 15}px`, animation: `bubbleMoveToTop ${Math.random() * 5 + 2}s ease-in-out -${(Math.random() * 5000) / 1000}s infinite` }">
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>
 
<style scoped lang="less">
.container {
  height: 370px;
  display: flex;
  flex: 1;
  justify-content: center;
  position: relative;
  overflow: hidden;
 
  .number {
    position: absolute;
    width: 300px;
    top: 20%;
    text-align: center;
    font-size: 32px;
    z-index: 10;
    color: #fff;
  }
 
  .contrast {
    width: 300px;
    height: 370px;
    overflow: hidden;
    animation: hueRotate 10s infinite linear;
    filter: contrast(10) hue-rotate(0);
 
    .circle {
      width: 300px;
      height: 300px;
      box-sizing: border-box;
      position: relative;
      filter: blur(8px);
 
      &::before {
        content: "";
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(0);
        width: 200px;
        height: 200px;
        background-color: #00ff6f;
        border-radius: 42% 38% 62% 49% / 45%;
        animation: rotate 10s infinite linear;
      }
 
      &::after {
        content: "";
        position: absolute;
        width: 176px;
        height: 176px;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 10;
      }
    }
 
    .bubbles {
      position: absolute;
      left: 50%;
      bottom: 0;
      width: 100px;
      height: 40px;
      transform: translate(-50%, 0);
      border-radius: 100px 100px 0 0;
      background-color: #00ff6f;
      filter: blur(5px);
 
      li {
        position: absolute;
        border-radius: 50%;
        background-color: #00ff6f;
        top: 50%;
        transform: translate(-50%, -50%);
      }
    }
  }
 
 
  @keyframes rotate {
    50% {
      border-radius: 45% / 42% 38% 58% 49%;
    }
 
    100% {
      transform: translate(-50%, -50%) rotate(720deg);
    }
  }
 
  @keyframes hueRotate {
    100% {
      filter: contrast(15) hue-rotate(360deg);
    }
  }
}
</style>