美文网首页
loading 动画

loading 动画

作者: coolkid_carryon | 来源:发表于2018-09-13 11:49 被阅读0次

    html:

    <!DOCTYPE html>
    <html>
    <head>
    <title>loading</title>
    <meta name="generator" content="Bluefish 2.2.7" >
    <meta name="author" content="dst" >
    <meta name="date" content="2018-09-12T17:26:39+0800" >
    <meta name="copyright" content="">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8">
    <meta http-equiv="content-style-type" content="text/css">
    <meta http-equiv="expires" content="0">
    <link href="css/loading.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <div class="box1">
            <div id="a" class="box2"></div>
            <div id="b" class="box2"></div>
            <div id="c" class="box2"></div>
            <div id="d" class="box2"></div>
            <div id="e" class="box2"></div>
        </div>
    </body>
    </html>
    

    css:

    .box1{
        width: 400px;
        height: 200px;
        margin: 150px auto 0;
        /*background-color: gold;*/
        border: 1px solid;
    }
    .box2{
        width: 50px;
        height: 150px;
        margin: 15px;
        float: left;
        border-radius: 20px;
    }
    #a{
        background-color: red;
        animation: moving 1s ease 0s infinite alternate both;
    }
    #b{
        background-color: blue;
        animation: moving 1s ease 0.2s infinite alternate both;
    }
    #c{
        background-color: pink;
        animation: moving 1s ease 0.4s infinite alternate both;
    }
    #d{
        background-color: green;
        animation: moving 1s ease 0.6s infinite alternate both;
    }
    #e{
        background-color: yellow;
        animation: moving 1s ease 0.8s infinite alternate both;
    }
    @keyframes moving{
        from{
            transform: scaleY(1);
        }
        to{
            transform: scaleY(0.5);
        }
    }
    

    效果图:


    loading.png

    相关文章

      网友评论

          本文标题:loading 动画

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