<!DOCTYPE html>
<html>
<head>
<title>图片旋转</title>
<style type="text/css">
img{
width: 200px;
height: 200px;
}
div{
width: 256px;
height: 256px;
border: 10px inset #f00;
margin: 0 auto;
background: #ccc;
border-radius: 256px; /*边框的弧度*/
cursor: pointer;
}
/* img{
width: 256px;
height: 256px;
}*/
</style>
<script type="text/javascript">
$('div').mouseenter(function(){ //鼠标滑上去就会转圈
s = 0;
v = 0;
setInterval(function(){
s+=v;
$('div').css({'transform':'rotate('+s+'deg)'});
},100);
})
</script>
</head>
<body>
<div>

</div>
</body>
</html>
图片.png