动画

作者: Yan00 | 来源:发表于2018-09-12 18:39 被阅读0次
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <title>动画</title>
        <style type="text/css">
            .box{
                width: 800px;
                height: 500px;
                background-color: azure;
                position: relative;
            }
            .box:hover{
    
            }
            @keyframes moving{
                0%{
                    transform: scaleY(1);
                }
                50%{
                    transform: scaleY(0.5);
                }
                100%{
                    transform: scaleY(1);
                }
            }
            .box1{
                width: 50px;
                height: 150px;
                background-color: red;
                animation: moving 1s ease 1s infinite;
                position: absolute;
                left: 100px;
                top: 200px;
                border-radius:20px;
            }
            .box2{
                width: 50px;
                height: 150px;
                background-color: lawngreen;
                animation: moving 1s ease 1.1s infinite;
                position: absolute;
                left: 200px;
                top: 180px;
                border-radius: 20px;
            }
            .box3{
                width: 50px;
                height: 150px;
                background-color: deepskyblue;
                animation: moving 1s ease 1.2s infinite;
                position: absolute;
                left: 300px;
                top: 175px;
                border-radius: 20px;
            }
            .box4{
                width: 50px;
                height: 150px;
                background-color:hotpink;
                animation: moving 1s ease 1.3s infinite;
                position: absolute;
                left: 400px;
                top: 160px;
                border-radius: 20px;
            }
            .box5{
                width: 50px;
                height: 150px;
                background-color:gold;
                animation: moving 1s ease 1.4s infinite;
                position: absolute;
                left: 500px;
                top: 150px;
                border-radius: 20px;
            }
        </style>
    </head>
    <body>
        <div class="box"></div>
            <div class="box1"></div>
            <div class="box2"></div>
            <div class="box3"></div>
            <div class="box4"></div>
            <div class="box5"></div>
    </body>
    </html>
    

    相关文章

      网友评论

          本文标题:动画

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