【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;
  }
}
相关推荐
kyriewen1 小时前
我手写了一个 EventEmitter,面试官追问了 6 个问题——第 4 个我没答上来
前端·javascript·面试
IT_陈寒1 小时前
Java的Date类又坑了我一次,改用时间戳真香
前端·人工智能·后端
小林攻城狮2 小时前
使用 Transport 节流解决 Vercel AI SDK 流式渲染卡死问题
前端·react.js
前端缘梦2 小时前
告别 TS 运行时类型漏洞!Zod 完整入门实战教程(前端 / 全栈必备)
前端·react.js·全栈
the_answer2 小时前
Webpack vs Vite 深度对比分析
前端·webpack
转转技术团队2 小时前
验证码识别实战:前端不写页面,改训模型了?
前端
MomentYY2 小时前
Temperature:AI 的“脑洞旋钮”
前端·llm·ai编程
远航_3 小时前
OpenSpec 完整详细介绍
前端·后端
召钱熏3 小时前
状态枚举正确≠渲染正确:一个语音按钮的状态机边界修复实录
android·前端
SkyWalking中文站3 小时前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控