圖片旋轉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>