前端 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>
相关推荐
专注VB编程开发20年41 分钟前
WebView2 处理跨域访问限制,Frame脚本执行,难度比CEF大10倍
前端·javascript·.net
CHANG_THE_WORLD1 小时前
指针入门一
java·前端·网络
摸鱼仙人~1 小时前
主流前端「语言/技术 → 主流框架 → 组件库生态 → 适用场景」解析
前端
程序员Sunday2 小时前
2026 春晚魔术大揭秘:作为程序员,分分钟复刻一个(附源码)
前端
Ehtan_Zheng3 小时前
Android 17 变更说明
前端
西门吹-禅3 小时前
【iFlow 处理agents】
前端·chrome
css趣多多3 小时前
Vue 响应式无限递归问题总结
前端·javascript·vue.js
一切顺势而行3 小时前
python 文件目录操作
java·前端·python
014-code4 小时前
Vue3 性能优化实战
前端·vue.js·性能优化
css趣多多5 小时前
vue2项目改造为vue3遇到的问题以及解决办法
前端·vue.js·elementui