圖片旋轉360°

                                                                                  圖片旋轉360°

1、效果

2、代碼

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>圖片旋轉360°</title>
    <style>
        img {
            border-radius: 50%;
            position: absolute;
            transition: all 0.5s ease-in-out;
            -moz-transition: all 0.5s ease-in-out;
            -webkit-transition: all 0.5s ease-in-out;
            -o-transition: all 0.5s ease-in-out;
        }
        img:hover {
            transform: rotate(360deg);
            -webkit-transform: rotate(360deg);
            -moz-transform: rotate(360deg);
            -ms-transform: rotate(360deg);
            -o-transform: rotate(360deg);
        }
        .img2{
            margin:120px;
        }
    </style>
    <script src="js/jquery.min.js"></script>
</head>
<body>
    <img src="https://profile.csdnimg.cn/1/4/1/3_qq_36025814">
    <img class="img2" src="https://img-blog.csdnimg.cn/20190927151053287.png?x-oss-process=image/resize,m_fixed,h_64,w_64">
</div>
</body>
</html>

 

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