代码 HTML文档,包含一个自定义的加载器

2024-11-19 09:21:12 +0800 CST views 884

该文本展示了一个简单的HTML文档,包含一个自定义的加载器。加载器使用CSS样式实现了旋转动画和百分比显示效果。文档设置了黑色背景,并通过CSS定义了加载器的外观和动画效果,旨在提供视觉反馈。

<!DOCTYPE html>
<html lang="zh">
 <head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
 </head>
 <style>
  body{background-color: #212121;}.loader{margin-top:300px;display:flex;justify-content:center;align-items:center;position:relative;cursor:not-allowed;scale:0.7;}.central{display:flex;justify-content:center;align-items:center;position:relative;width:10em;height:10em;border-radius:50%;box-shadow:0.5em 1em 1em blueviolet,-0.5em 0.5em 1em blue,0.5em -0.5em 1em purple,-0.5em -0.5em 1em cyan;}.external-shadow{width:10em;height:10em;border-radius:50%;display:flex;justify-content:center;align-items:center;position:relative;box-shadow:0.5em 0.5em 3em blueviolet,-0.5em 0.5em 3em blue,0.5em -0.5em 3em purple,-0.5em -0.5em 3em cyan;z-index:999;animation:rotate 3s linear infinite;background-color:#212121;}.intern{position:absolute;color:white;z-index:9999;}.intern::before{content:"100%";animation:percent 2s ease-in-out infinite;}@keyframes rotate{0%{transform:rotate(0deg);}50%{transform:rotate(180deg);}100%{transform:rotate(360deg);}}@keyframes percent{0%{content:'0%';}25%{content:'25%';}33%{content:'33%';}42%{content:'42%';}51%{content:'51%';}67%{content:'67%';}74%{content:'74%';}75%{content:'75%';}86%{content:'86%';}95%{content:'95%';}98%{content:'98%';}99%{content:'99%';}}
 </style>
 <body>
  <div class="loader">
        <div class="intern">
        </div>
    <div class="external-shadow">
      <div class="central">
      </div>
    </div>
  </div>
 </body>
 <script>
 </script>
</html>
复制全文 生成海报 前端开发 网页设计 动画效果

推荐文章

禁止调试前端页面代码
2024-11-19 02:17:33 +0800 CST
Go 接口:从入门到精通
2024-11-18 07:10:00 +0800 CST
PHP 代码功能与使用说明
2024-11-18 23:08:44 +0800 CST
PHP中获取某个月份的天数
2024-11-18 11:28:47 +0800 CST
PostgreSQL日常运维命令总结分享
2024-11-18 06:58:22 +0800 CST
如何在 Linux 系统上安装字体
2025-02-27 09:23:03 +0800 CST
Requests库详细介绍
2024-11-18 05:53:37 +0800 CST
Vue3中如何处理权限控制?
2024-11-18 05:36:30 +0800 CST
在 Vue 3 中如何创建和使用插件?
2024-11-18 13:42:12 +0800 CST
Go中使用依赖注入的实用技巧
2024-11-19 00:24:20 +0800 CST
Vue3中的Slots有哪些变化?
2024-11-18 16:34:49 +0800 CST
H5抖音商城小黄车购物系统
2024-11-19 08:04:29 +0800 CST
使用xshell上传和下载文件
2024-11-18 12:55:11 +0800 CST
支付宝批量转账
2024-11-18 20:26:17 +0800 CST
JavaScript中的常用浏览器API
2024-11-18 23:23:16 +0800 CST
程序员茄子在线接单