前端 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>
相关推荐
钱栈up2 小时前
均值虚线静默消失三天,零报错零告警——一次匹配逻辑 P0 事故的完整复盘
前端·数据可视化
Setsuna_F_Seiei7 小时前
性能优化 - 列表分页查询的优化
前端·vue.js·性能优化
Setsuna_F_Seiei7 小时前
性能优化 - Vue.js 的懒加载的优化封装
前端·vue.js·性能优化
excel8 小时前
Prisma 查询不到 SQL 更新后的字段?先别急着重新打包
前端
狗头大军之江苏分军10 小时前
《潮水漫过十七岁》倒计时
前端·javascript·后端
小码哥06811 小时前
租房平台源码部署验收:房源样例、区域字典与看房预约逐项验证
前端·javascript·vue.js·租房小程序·租房系统·租房软件
htzyl20612 小时前
JS原型链与继承:class 底下到底是什么
前端·javascript·ecmascript 6
一条Go12 小时前
15 套品牌色 + 双模式:把颜色关进三层 token
前端·github
htzyl20612 小时前
JS-关于闭包捕获与释放
前端·javascript
狗头大军之江苏分军12 小时前
《潮水漫过十七岁》好久没写了
前端·javascript·后端