美文网首页
纯CSS加载中动画

纯CSS加载中动画

作者: 阿古瓜 | 来源:发表于2018-02-09 12:36 被阅读0次
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>加载中动画效果</title>
    <style type="text/css">
    dot {
        display: inline-block;
        height: 1em;
        line-height: 1;
        text-align: left;
        vertical-align: -.25em;
        overflow: hidden;
    }

    dot::before {
        display: inline-block;
        content: '...\A..\A.';
        white-space: pre;
        animation: dot 3s infinite step-start both;
    }

    @keyframes dot {
        33% {
            transform: translateY(-2em);
        }
        66% {
            transform: translateY(-1em);
        }
    }
    </style>
</head>

<body>
    <p>正在加载中<dot>...</dot></p>
</body>

</html>

相关文章

网友评论

      本文标题:纯CSS加载中动画

      本文链接:https://www.haomeiwen.com/subject/usuftftx.html