动画

<!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>
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容