CSS3中transform和transition必须一起使用,实现:hover旋转效果

 .test{
        width: 150px;
        height: 150px;
        background: yellowgreen;
        transform: rotate(0deg);
        transition: transform 1.5s;
    }
        .test:hover{
            transform: rotate(360deg);
        }



html:

<div class="test">
    这是测试!
</div>

 

posted on 2017-05-22 22:15  cheerone  阅读(573)  评论(0编辑  收藏  举报