加载中旋转沙漏

诶呦图丢了

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>sandglass</title>
    <style>
        @keyframes sandglass {
            0% {
                transform: rotate(0deg);
            }

            25%, 50% {
                transform: rotate(180deg);
            }

            75%, 100% {
                transform: rotate(360deg);
            }
        }

        @keyframes bottom-sand {
            0% {
                transform: translateY(-30%);
            }

            50% {
                transform: translateY(0%);
            }

            100% {
                transform: translateY(30%);
            }
        }

        @keyframes top-sand {
            0% {
                transform: translateY(0%);
            }

            50% {
                transform: translateY(-30%);
            }

            51% {
                transform: translateY(-30%) translateX(100%);
            }

            52% {
                transform: translateY(30%) translateX(100%);
            }

            53% {
                transform: translateY(30%);
            }

            100% {
                transform: translateY(0%);
            }
        }

        @keyframes point {
            0% {
                opacity: 1;
            }

            50% {
                opacity: .2;
            }

            100% {
                opacity: 1;
            }
        }

        .sandglass {
            transform-origin: 0 0;
            animation: sandglass 5s cubic-bezier(0.075, 0.82, 0.165, 1) infinite;
        }

        .bottom-sand {
            transform-origin: 0 0;
            animation: bottom-sand 5s ease-in-out infinite;
        }

        .top-sand {
            transform-origin: 0 0;
            animation: top-sand 5s ease-in-out infinite;
        }

        .label {
            padding: 3rem;
            padding-top: 0;
        }
        .point{
			animation-name: point;
			animation-duration: 2s;
			animation-timing-function: linear;
			animation-iteration-count: infinite;
        }
    </style>
</head>

<body>
    <div style="width:800px;margin:auto;text-align:center;background:#222;">
        <svg style="height:300px;" viewBox="-75 -75 150 150">
            <defs>
                <clipPath id="top">
                    <path d="M 0,2.4882812 -28.052734,30.541016 V 46.480469 H 28.052734 V 30.541016 Z" />
                </clipPath>
                <clipPath id="top-sand">
                    <path class="top-sand" d="M 0,2.4882812 -28.052734,30.541016 V 46.480469 H 28.052734 V 30.541016 Z" />
                </clipPath>
                <clipPath id="bottom">
                    <path d="m -28.052734,-46.480469 v 15.939453 L 0,-2.4882812 28.052734,-30.541016 v -15.939453 z" />
                </clipPath>
                <clipPath id="bottom-sand">
                    <path class="bottom-sand" d="m -28.052734,-46.480469 v 15.939453 L 0,-2.4882812 28.052734,-30.541016 v -15.939453 z" />
                </clipPath>
            </defs>
            <g class="sandglass">
                <path fill="#fff" d="m -29.8125,-50 a 1.75945,1.75945 0 0 0 -1.759766,1.759766 V -29.8125 a 1.7596259,1.7596259 0 0 0 0.515625,1.244141 L -2.488281,1.1402179e-8 -31.056641,28.568359 A 1.7596259,1.7596259 0 0 0 -31.572266,29.8125 V 48.240234 A 1.7596259,1.7596259 0 0 0 -29.8125,50 h 59.625 a 1.7596259,1.7596259 0 0 0 1.759766,-1.759766 V 29.8125 A 1.7596259,1.7596259 0 0 0 31.056641,28.568359 L 2.488281,1.1402179e-8 31.056641,-28.568359 A 1.7596259,1.7596259 0 0 0 31.572266,-29.8125 V -48.240234 A 1.7596259,1.7596259 0 0 0 29.8125,-50 Z m 1.759766,3.519531 h 56.105468 v 15.939453 L 1.1366282e-8,-2.488281 -28.052734,-30.541016 Z M 1.1366282e-8,2.488281 28.052734,30.541016 V 46.480469 H -28.052734 V 30.541016 Z" />
                <g clip-path="url(#bottom)">
                    <g clip-path="url(#bottom-sand)">
                        <rect fill="#fff" x="-75" y="-75" width="150" height="150" />
                    </g>
                </g>
                <g clip-path="url(#top)">
                    <g clip-path="url(#top-sand)">
                        <rect fill="#fff" x="-75" y="-75" width="150" height="150" />
                    </g>
                </g>
            </g>
        </svg>
        <h2 class="label">loading
            <span class="point" style="animation-delay:.25s;">.</span>
            <span class="point" style="animation-delay:.5s;">.</span>
            <span class="point" style="animation-delay:.75s;">.</span>
        </h2>
    </div>
</body>

</html>
  • 7
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值