【CSS3】录音中。。。

ai写的这个动画效果感觉是真不错,记录下来

html 复制代码
<div
      v-if="recordText.includes('录音中')"
      class="recording-popup"
      flex
      flex-col
      items-center
      justify-center
    >
      <div class="recording-animation">
        <div class="recording-wave"></div>
        <div class="recording-wave"></div>
        <div class="recording-wave"></div>
      </div>
      <div mt-2 text-white>{{ recordText }}</div>
    </div>
css 复制代码
/* 录音悬浮小窗样式 */
.recording-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  padding: 15px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  width: 120px;
  height: 120px;
}

.recording-animation {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recording-wave {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid #ff4d4f;
  border-radius: 50%;
  animation: recording-wave-animation 1.5s infinite;
}

.recording-wave:nth-child(2) {
  animation-delay: 0.5s;
}

.recording-wave:nth-child(3) {
  animation-delay: 1s;
}

@keyframes recording-wave-animation {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
相关推荐
Kagol4 分钟前
🎉TinyVue v3.27.0 正式发布:增加 Space 新组件,ColorPicker 组件支持线性渐变
前端·vue.js·typescript
潍坊老登4 分钟前
大前端框架汇总/产品交互参考UE
前端
方安乐11 分钟前
获取URL参数如何避免XSS攻击
前端·xss
十二AI编程24 分钟前
MiniMax M2.1 实测,多语言编程能力表现出色!
前端
鹿野素材屋44 分钟前
技术闲聊:为什么网游会在固定时间点,刷出固定的道具?
前端·网络·unity
同学807961 小时前
🔥🔥高效易用的 Vue3 公告滚动组件:打造丝滑的内容滚动体验(附源码)
前端·vue.js
编程修仙1 小时前
第二篇 Vue指令
前端·javascript·vue.js·前端框架
frontend丶CV1 小时前
useMemo
前端·react.js
明月_清风1 小时前
基于 node-rtsp-stream 的 Web 直播方案详解
前端