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>
相关推荐
@菜菜_达3 小时前
CSS a标签内文本折行展示
前端·css
spmcor4 小时前
css 之 Flexbox 的一生
前端·css
Thanks_ks4 小时前
探索现代 Web 开发:从 HTML5 到 Vue.js 的全栈之旅
javascript·vue.js·css3·html5·前端开发·web 开发·全栈实战
GIS之路4 小时前
OpenLayers 获取地图状态
前端·javascript·html
FogLetter4 小时前
深入理解Flex布局:grow、shrink和basis的计算艺术
前端·css
小桥风满袖4 小时前
Three.js-硬要自学系列33之专项学习基础材质
前端·css·three.js
断竿散人5 小时前
专题一、HTML5基础教程-http-equiv属性深度解析:网页的隐形控制中心
前端·html
onebyte8bits6 小时前
CSS Houdini 解锁前端动画的下一个时代!
前端·javascript·css·html·houdini
行云流水62618 小时前
js实现输入高亮@和#后面的内容
前端·javascript·css
Bigger19 小时前
🍸 Apple Liquid Glass 设计理念与前端实现解析
前端·css·apple