<style type="text/css">
#div1{
width: 300px;
height: 300px;
background-color: greenyellow;
}
</style>
</head>
<body>
<input type="button" name="btn" id="btn" value="点击旋转" />
<div id="div1"></div>
</body>
<script type="text/javascript" src="js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="js/jQueryRotate.js"></script>
<script type="text/javascript">
$(function(){
var angle = 0;
$("#btn").click(function(){
var timer = setInterval(function(){
angle+=3;
$("#div1").rotate(angle);
},10);
});
})
慕标5832272
相关分类