前端 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>
相关推荐
mfxcyh4 小时前
Vue3 右键菜单实现方案(基于 vue3-context-menu)
前端
treesforest4 小时前
从IP地址归属地查询到IP地理位置精准查询指南
服务器·前端·网络
LF男男4 小时前
WindmillBullect.cs
前端
小白学大数据4 小时前
Python 爬虫爬取应用商店数据:请求构造与数据解析
前端·爬虫·python·数据分析
pkowner4 小时前
若依分页问题及解决方法
java·前端·算法
golang学习记4 小时前
Cursor官方团队的AI指南:Cursor Team Kit
前端·cursor
Lee川4 小时前
RAG 知识库问答:从概念到代码的完整实现
前端·人工智能·后端
计算机安禾5 小时前
【c++面向对象编程】第22篇:输入输出运算符重载:<< 与 >> 的友元实现
java·前端·c++
redreamSo5 小时前
14 小时烧光 200 美金:Codex 和 Claude 的 /goal 命令打开了"放手跑"模式
前端
TingTing5 小时前
Webpack5 前端工程化建设
前端