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

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

该文本展示了一个简单的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 09:18:23 +0800 CST
markdowns滚动事件
2024-11-19 10:07:32 +0800 CST
XSS攻击是什么?
2024-11-19 02:10:07 +0800 CST
关于 `nohup` 和 `&` 的使用说明
2024-11-19 08:49:44 +0800 CST
前端如何给页面添加水印
2024-11-19 07:12:56 +0800 CST
MySQL数据库的36条军规
2024-11-18 16:46:25 +0800 CST
LLM驱动的强大网络爬虫工具
2024-11-19 07:37:07 +0800 CST
Vue 中如何处理父子组件通信?
2024-11-17 04:35:13 +0800 CST
15 个 JavaScript 性能优化技巧
2024-11-19 07:52:10 +0800 CST
go错误处理
2024-11-18 18:17:38 +0800 CST
Golang Sync.Once 使用与原理
2024-11-17 03:53:42 +0800 CST
一些实用的前端开发工具网站
2024-11-18 14:30:55 +0800 CST
最全面的 `history` 命令指南
2024-11-18 21:32:45 +0800 CST
mysql int bigint 自增索引范围
2024-11-18 07:29:12 +0800 CST
Elasticsearch 监控和警报
2024-11-19 10:02:29 +0800 CST
pip安装到指定目录上
2024-11-17 16:17:25 +0800 CST
html流光登陆页面
2024-11-18 15:36:18 +0800 CST
前端开发中常用的设计模式
2024-11-19 07:38:07 +0800 CST
程序员茄子在线接单