鼠标经过离开时 效果流畅

<!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>简单解决</title>
        <style type="text/css">
            div{
                width: 100px;
                height: 100px;
                border:1px solid;
    
                margin:0px auto;
                margin-top: 200px;
    
                /* 在此处留一个transition就够了 */
                transition: all 1s linear;
            }
            div:hover{
                transform: scale(2);
                 /* 去掉这个tansition */
                /* transition:  all 1s linear; */
            }
        </style>
    </head>
    <body>
        <div></div>
    </body>
</html>

  

posted @ 2018-07-13 14:18  南侠书生  阅读(253)  评论(0编辑  收藏  举报