推荐一个图片旋转插件,用于浏览相册时,旋转图片。看一下demo
<script type="text/javascript">
$(document).ready(function () {
$("#images").rotate(45);
var value = 0
$("#images1").rotate({
bind:
{
mouseover: function(){
value +=90;
$(this).rotate({ animateTo:value})
}
}
});
$('#button').click(function(){
$("#images1").rotate({animateTo:parseInt($('#angel').val())});
});
function rotation (){
$("#images2").rotate({
angle:0,
animateTo:360,
callback: rotation,
easing: function (x,t,b,c,d){
return c*(t/d)+b;
}
});
}
rotation();
});
</script>
上面只是js代码,详细的请看demo页面中的源代码。
转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/jsjquery/1492.html