前端 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>
相关推荐
Bigger10 分钟前
🚀 mini-cc:打造你的专属轻量级 AI 编程智能体
前端·node.js·claude
小江的记录本10 分钟前
【网络安全】《网络安全三大加密算法结构化知识体系》
java·前端·后端·python·安全·spring·web安全
广师大-Wzx26 分钟前
JavaWeb:前端部分
java·前端·javascript·css·vue.js·前端框架·html
M ? A29 分钟前
你的 Vue v-memo 与 v-once,VuReact 会编译成什么样的 React 代码?
前端·javascript·vue.js·经验分享·react.js·面试·vureact
是上好佳佳佳呀33 分钟前
【前端(七)】CSS3 核心属性笔记:单位、背景、盒子模型与文本换行
前端·笔记·css3
踩着两条虫1 小时前
VTJ:技术架构概述
前端·架构·ai编程
超级无敌攻城狮1 小时前
Agent 到底是怎么跑起来的
前端·后端·架构
吴声子夜歌1 小时前
Vue3——过度和动画效果
前端·vue.js·es6
Via_Neo1 小时前
字符串类型的相互转换
前端
zopple2 小时前
前端三剑客 vs Vue.js:核心区别解析
前端·javascript·vue.js