前端 CSS 经典:水波进度样式

前言:简单实现水波进度样式,简单好看。

效果图:

代码实现:

html 复制代码
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta
      name="viewport"
      content="initial-scale=1.0, user-scalable=no, width=device-width"
    />
    <title>document</title>
    <style>
      body {
        background: #000;
      }
      .indicator {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3em;
        margin: 200px auto;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        border: 2px solid #fff;
        position: relative;
        overflow: hidden;
        color: #fff;
      }
      .indicator span {
        position: absolute;
        z-index: 999;
      }
      .indicator::after {
        content: "";
        width: 200px;
        height: 200px;
        border-radius: 60px;
        position: absolute;
        left: -50%;
        top: 50px;
        background: blue;
        animation: rotate 5s linear 0s infinite;
      }
      @keyframes rotate {
        from {
          transform: rotateZ(0deg);
        }
        to {
          transform: rotateZ(359deg);
        }
      }
    </style>
  </head>
  <body>
    <div>
      <div class="indicator">
        <span>50</span>
      </div>
    </div>
    <script></script>
  </body>
</html>
相关推荐
peepeeman4 小时前
vue组件透传
前端·javascript·vue.js
镜宇秋霖丶4 小时前
2026.5.12@霖宇博客制作中遇见的问题
前端·vue.js·elementui
醉逍遥neo5 小时前
mac新电脑-前端开发配置
前端·macos·ghostty
白嫖叫上我5 小时前
Vue3封装主题色完善版
前端
a1117765 小时前
细胞结构实验室(react 开源)
前端·javascript·开源·html
aaaak_5 小时前
PDD 直播间 评论 , wss hex Protobuf 解析流程分析学习
java·前端·学习
ikoala5 小时前
用了几周明基 RD280UG,我终于明白程序员为什么需要一台“专用显示器”
前端·后端·程序员
文心快码BaiduComate5 小时前
Comate搭载DeepSeek-V4
前端·后端
豹哥学前端5 小时前
5分钟搞懂事件委托
前端·javascript·面试
Awu12276 小时前
🍎把数学公式搬进 Web 表格:一个 VTable 实战案例
前端