呼吸灯的实现 用transform和animation实现

实现前端呼吸灯效果,录音效果

效果图如下:

Copy
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .pulse { background: #FF4754; -webkit-box-shadow: 0 0 0 0 #FF4754; box-shadow: 0 0 #ff4754; border-radius: 50%; -ms-flex-item-align: center; align-self: center; z-index: 100; min-width: 8px; height: 8px; margin-right: 13px; -webkit-transform: scale(1); transform: scale(1); -webkit-animation: pulse-animation-0764004c 2s infinite; animation: pulse-animation-0764004c 2s infinite; } @keyframes pulse-animation-0764004c { 0% { -webkit-transform: scale(.95); transform: scale(.95); -webkit-box-shadow: 0 0 0 0 rgba(255,71,84,.7); box-shadow: 0 0 #ff4754b3; } 70% { -webkit-transform: scale(1); transform: scale(1); -webkit-box-shadow: 0 0 0 7px rgba(255,71,84,0); box-shadow: 0 0 0 7px #ff475400; } 100% { -webkit-transform: scale(.95); transform: scale(.95); -webkit-box-shadow: 0 0 0 0 rgba(255,71,84,0); box-shadow: 0 0 #ff475400; }} </style> </head> <body> <div class="bg"> <div class="pulse" style=""></div> </div> </body> </html>
posted @   Homegu  阅读(135)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
你的浏览器不支持canvasr
点击右上角即可分享
微信分享提示