lod动画

作者: 中二死军宅 | 来源:发表于2019-04-02 23:01 被阅读0次

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>loading动画</title>
    <style type="text/css">
    .box{
    width: 300px;
    height: 135px;
    border: 2px solid #000;
    margin: 200px auto 0;
    }
    .box p{
    text-align: center;
    width: 100%;

        }
        .box div{
            width: 30px;
            height: 70px;
            float: left;
            background-color: gold;
            margin: 15px;
            border-radius: 10px;
        }
        .box div:nth-child(1){
            background-color: red;
            animation: loading 0.5s ease 0s infinite alternate;
        }
        .box div:nth-child(2){
            background-color: green;
            animation: loading 0.5s ease 0.1s infinite alternate;
        }
        .box div:nth-child(3){
            background-color: pink;
            animation: loading 0.5s ease 0.2s infinite alternate;
        }
        .box div:nth-child(4){
            background-color: greenyellow;
            animation: loading 0.5s ease 0.3s infinite alternate;
        }
        .box div:nth-child(5){
            background-color: cyan;
            animation: loading 0.5s ease 0.4s infinite alternate;
        }
        @keyframes loading{
            from{
                transform: scaleY(1);
            }
            to{
                transform: scaleY(0.5);
            }
        }
    </style>
    

    </head>
    <body>
    <div class="box">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <p>loading...</p>
    </div>
    </body>
    </html>

    相关文章

      网友评论

          本文标题:lod动画

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