在这里插入代码片<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
img {
width: 300px;
/* 顺时针旋转40度,逆时针则用负数 */
transform: rotate(40deg);
border-radius: 50%;
border: red 1px solid;
}
/* 当鼠标经过图片的时候图片旋转360度 */
img:hover {
transform: rotate(360deg);
}
</style>
</head>
<body>
<img src="imgs/2D旋转.png">
</body>
</html>```
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200316175900829.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MjM3ODQwOQ==,size_16,color_FFFFFF,t_70)
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200316180138897.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MjM3ODQwOQ==,size_16,color_FFFFFF,t_70)
2D旋转
猜你喜欢
转载自blog.csdn.net/weixin_42378409/article/details/104904618
今日推荐
周排行