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

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

该文本展示了一个简单的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>
复制全文 生成海报 前端开发 网页设计 动画效果

推荐文章

html文本加载动画
2024-11-19 06:24:21 +0800 CST
Vue3 vue-office 插件实现 Word 预览
2024-11-19 02:19:34 +0800 CST
Rust 与 sqlx:数据库迁移实战指南
2024-11-19 02:38:49 +0800 CST
从Go开发者的视角看Rust
2024-11-18 11:49:49 +0800 CST
html夫妻约定
2024-11-19 01:24:21 +0800 CST
如何将TypeScript与Vue3结合使用
2024-11-19 01:47:20 +0800 CST
在 Rust 生产项目中存储数据
2024-11-19 02:35:11 +0800 CST
2025,重新认识 HTML!
2025-02-07 14:40:00 +0800 CST
在 Docker 中部署 Vue 开发环境
2024-11-18 15:04:41 +0800 CST
使用 Git 制作升级包
2024-11-19 02:19:48 +0800 CST
智能视频墙
2025-02-22 11:21:29 +0800 CST
一个数字时钟的HTML
2024-11-19 07:46:53 +0800 CST
npm速度过慢的解决办法
2024-11-19 10:10:39 +0800 CST
Go语言SQL操作实战
2024-11-18 19:30:51 +0800 CST
Vue中的样式绑定是如何实现的?
2024-11-18 10:52:14 +0800 CST
MySQL 优化利剑 EXPLAIN
2024-11-19 00:43:21 +0800 CST
JavaScript 策略模式
2024-11-19 07:34:29 +0800 CST
程序员茄子在线接单