美文网首页
loading动画

loading动画

作者: Alice丨殇 | 来源:发表于2018-10-25 17:16 被阅读0次

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>zy</title>
    <style type="text/css">
    *{
    margin: 0;
    padding: 0;
    }

        .box{
            width: 300px;
            height: 125px;
            border: 1px solid black;
            margin:100px auto 0;
        }
        
        .box div{
            width: 30px;
            height: 70px;
            margin: 15px; 
            background-color: red;
            float: left;
            border-radius:10px;
        }
        
        .box p{
            text-align: center;
            width: 100%;
            float: left;    
        }
        
        .box div:nth-child(1){
            animation:loading 500ms ease 0s infinite alternate;
        }
        .box div:nth-child(2){
            background-color: green;
            animation: loading 500ms ease 100ms infinite alternate;
        }
        .box div:nth-child(3){
            background-color: pink;
            animation:loading 500ms ease 200ms infinite alternate;
        }
        .box div:nth-child(4){
            background-color: yellowgreen;
            animation:loading 500ms ease 300ms infinite alternate;
        }
        .box div:nth-child(5){
            background-color: cyan;
            animation:loading 500ms ease 400ms 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>

    image.png

    相关文章

      网友评论

          本文标题:loading动画

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