html 边缘融合加载

html 代码

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>边缘融合加载</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            height: 100vh;
            padding-bottom: 80px;
            background: #000000;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .loading {
            width: 300px;
            height: 300px;
            background: #000000;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            filter: contrast(15);
        }

        .loading span {
            width: 30px;
            height: 30px;
            background: #ffffff;
            border-radius: 50%;
            position: absolute;
            left: 50px;
            transform-origin: 100px center;
            transform: rotate(calc(360deg / 8 * var(--i)));
            animation: show 3s infinite;
            filter: blur(5px);
        }

        @keyframes show {
            0% {
                transform: rotate(0deg) translateX(80px);
            }
            50%, 100% {
                transform: rotate(calc(360deg / 8 * var(--i)));
            }
            100% {
                transform: rotate(360deg) translateX(80px);
            }
        }

        .text {
            font-size: 20px;
            color: #ffffff;
            padding-left: 10px;
            display: flex;
        }

        .text span {
            padding: 0 4px;
            animation: upDown 1.5s ease-in-out infinite;
            animation-delay: calc(0.1s * var(--i));
        }

        @keyframes upDown {
            0% {
                transform: translateY(0px);
            }
            20% {
                transform: translateY(-24px);
            }
            40%, 100% {
                transform: translateY(0px);
            }
        }
    </style>
</head>
<body>
<div class="loading">
    <span style="--i:0;"></span>
    <span style="--i:1;"></span>
    <span style="--i:2;"></span>
    <span style="--i:3;"></span>
    <span style="--i:4;"></span>
    <span style="--i:5;"></span>
    <span style="--i:6;"></span>
    <span style="--i:7;"></span>
</div>
<div class="text">
    <span style="--i:0">正</span>
    <span style="--i:1">在</span>
    <span style="--i:2">加</span>
    <span style="--i:3">中</span>
    <span style="--i:4">,</span>
    <span style="--i:5">请</span>
    <span style="--i:6">等</span>
    <span style="--i:7">待</span>
    <span style="--i:8">.</span>
    <span style="--i:9">.</span>
    <span style="--i:10">.</span>
</div>
</body>
</html>
相关推荐
DanB242 小时前
html复习
javascript·microsoft·html
像风一样自由202012 小时前
原生前端JavaScript/CSS与现代框架(Vue、React)的联系与区别(详细版)
前端·javascript·css
paid槮13 小时前
HTML5如何创建容器
前端·html·html5
拾光拾趣录14 小时前
HTML行内元素与块级元素
前端·css·html
奶丝兔蜜柚16 小时前
物理像素&逻辑像素&DPR
css
还是大剑师兰特21 小时前
CSS面试题及详细答案140道之(41-60)
前端·css·大剑师·css面试·css示例
精神小伙2号1 天前
css position
前端·css·html
鲸落✗1 天前
黑色风格音乐播放器网站模板(附完整源码)
前端·html·web
东华果汁哥1 天前
【URL 转换为PDF】HTML转换为PDF
前端·pdf·html
PanZonghui1 天前
移动端适配全景指南:从原理到实战的完整解决方案
前端·javascript·css