<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">
<script src="path/to/jquery.min.js"></script>
<script src="path/to/jQueryRotate.js"></script> jQueryRotate.js插件集成了4个用于图片旋转的方法,分别为: rotate(angle) rotate(parameters) getRotateAngle() stopRotate()
$("#img").rotate(45); parameters参数包括: angle [Number] :图片旋转角度,默认为0度。 bind [Object] : 绑定事件。 animateTo [Number] :图片旋转到指定的角度,默认为0。 center [Array] : 定义图片旋转的中心点。 duration [Number] - 图片旋转的持续时间,默认为1000。 step [Function] :每一步动画后执行的回调函数。 easing [Function] :图片旋转的easing动画。 callback[Function] :图片旋转动画结束后的回调函数。
$("#img").rotate({
angle: 45,
bind: {
click : function(){
alert($(this).getRotateAngle());
}
}
}); $("#img").rotate({
bind: {
click: function(){
$("#img").rotate({
angle: 0,
animateTo: 180,
duration: 6000
});
setTimeout(function(){
$("#img").stopRotate();
}, 1000);
}
}
});
*
回帖描述:*
链接类型:*
下载链接:*
描述:*
回帖描述:*
链接类型:*
阅读权限:*
下载链接:



聚优部落技术论坛 © 版权所有 鲁ICP备15007479号-6
Copyright(C)web.com, All Rights Reserved.
