图片旋转
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>demo</title>
<style>
.dog{
width: 256px;
height:256px;
background: #faa;
border-radius: 128px;
overflow: hidden;
cursor: pointer;
}
</style>
<script src="./demo/jquery.min.js"></script>
</head>
<body>
<div class="dog">
<img src="./demo/dog.png" alt="">
</div>
</body>
<script>
$('.dog').click(function(){
s=0;
v=20;
setInterval(function(){
s+=v;
document.title=s;
$('.dog').find('img').attr({'src':'./demo/cai.png'}).parent().css('background','#aaf').css('transform','rotate('+s+'deg)');
},50);
});
</script>
</html>