【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;
  }
}
相关推荐
星栈9 小时前
我在浏览器里试了试 PhotoCraft|Rust + WASM 修图,是玩具还是生产力?
前端
雨中飘荡的记忆10 小时前
淘宝搜不到的东西,能不能去全世界找?一个程序员的创业尝试
前端·设计
kyriewen10 小时前
我让 4 位 AI 面试官打分,同一个我差了 40 分
前端·面试·程序员
htzyl20612 小时前
Vue3中watch的deep默认值:reactive与ref为什么相反
前端·vue.js
用户1129361121912 小时前
没写样式为什么还找我要 wxss?uni-app 这个 ENOENT 坑多数人误判了
前端·微信小程序·uni-app
用户5536659352612 小时前
从零做一个全国山峰与线路库:山野抽签的初衷、架构与踩坑
前端
夕水12 小时前
用 SolidJS 复刻 DeepSeek Chat —— 顺便把 ew-solid-ui 拷打了一遍
前端·javascript
qq_2744751513 小时前
第 17 篇:ES6 语法速览:解构赋值、展开运算符、模板字符串、对象简写
前端·ecmascript·es6
凯程序猿1号14 小时前
Web墨卡托EPSG3857瓦片行列号XYZ与经纬度双向换算及地面分辨率推导
前端·电脑
qq_2744751515 小时前
第 21 篇:Proxy 代理与 Reflect:数据劫持基础,Vue 响应式底层原理前置
前端·javascript·vue.js