【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;
  }
}
相关推荐
鸡吃丸子3 分钟前
Tailwind CSS 入门指南
前端·css
ObjectX前端实验室16 分钟前
LLM的生态与能力边界&一个基本对话的实现
前端·langchain·llm
LFly_ice37 分钟前
学习React-16-useContext
前端·学习·react.js
陈陈CHENCHEN44 分钟前
使用 Vite 快速创建 React 项目 - SuperMap iClient JavaScript / Leaflet
前端·react.js
用户6883362059701 小时前
Progressive Web App (PWA)
前端
沢田纲吉1 小时前
《LLVM IR 学习手记(二):变量表达式编译器的实现与深入解析》
前端·编程语言·llvm
小徐_23331 小时前
VitePress 博客变身 APP,支持离线访问,只需这一招。
前端·vitepress·pwa
猪哥帅过吴彦祖1 小时前
第 5 篇:WebGL 从 2D 到 3D - 坐标系、透视与相机
前端·javascript·webgl
折七1 小时前
expo sdk53+ 集成极光推送消息推送 ios swift
前端·javascript·ios