c3动画 衔接动画

c3动画 衔接动画

在这里插入图片描述


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            width: 200px;
            height: 200px;
            background: red;
            /* 动画名称 */
            /* animation-name: dong; */
            /* 动画总时长2s */
            /* animation-duration: 2s; */
            /* 执行3次 */
            /* animation-iteration-count: 3; */
            /* 动画逆播 */
            /* animation-direction: alternate; */
            /* 动画匀速执行 */
            /* animation-timing-function: linear; */
            /* 动画延时1s 执行 */
            /* animation-delay: 1s; */
            /* 动画执行完后的状态 */
            /* animation-fill-mode: forwards; */
            /* animation: dong 12s 3 alternate linear 0.5s forwards; */
            /* margin: 200px auto; */
            animation: dong1 1s forwards, dong2 1s 2s forwards, dong3 1s 3s forwards;
        }
        
        @keyframes dong1 {
            from {
                width: 200px;
            }
            to {
                width: 400px;
            }
        }
        
        @keyframes dong2 {
            from {
                height: 200px;
            }
            to {
                height: 400px;
            }
        }
        
        @keyframes dong3 {
            from {
                background-color: red;
            }
            to {
                background-color: blue;
            }
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章