css3动画简单案例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS3 动画</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background-color: #F7F7F7;
        }

        .box {
             400px;
            margin: 100px auto;
        }

        .box img{
            /*4.调用动画*/
            animation: rotateFuc 4s linear 0s;
        }


        /*动画的第一步*/
        /*1.申明动画序列  @keyframes  跟着的是动画序列的名称*/
        @keyframes  rotateFuc{
            /*2.写动画的节点  from 0%  to 100%   百分比是时间节点*/
            from{

            }

            25%{
                /*3.添加动画属性*/
                transform: rotate(360deg) scale(2);
            }

            75%{
                /*3.添加动画属性*/
                transform: rotate(720deg) scale(0.5);
            }

            to{
                transform: none;
            }
        }





    </style>
</head>
<body>
    <div class="box">
        <img src="./images/fengche.png">
    </div>
</body>
</html>
原文地址:https://www.cnblogs.com/lsy0403/p/5935170.html