需要js:
jquery1.7.1.js
jQueryRotate.2.2.js
jQuery图片旋转插件,支持Internet Explorer 6.0+ 、Firefox 2.0 、Safari 3 、Opera 9 、Google Chrome,高级浏览器下使用Transform,低版本ie使用VML实现。
调用和方法:
rotate(angle)
angle参数:[Number] – 默认为 0 – 根据给定的角度旋转图片
例如:
$("#img").rotate(45);
rotate(parameters)
parameters参数:[Object] 包含旋转参数的对象。支持的属性:
- angle属性:[Number] – default 0 – 旋转的角度数,并且立即执行
例如:
$("#img").rotate({angle:45});
2.bind属性:[Object] 对象,包含绑定到一个旋转对象的事件。事件内部的$(this)指向旋转对象-这样你可以在内部链式调用- $(this).rotate(…)。例如 (click on arrow):
$("#img").rotate({bind:{ click: function(){ $(this).rotate({ angle: 0, animateTo:180 }) } } });
3. animateTo属性:[Number] – default 0 – 从当前角度值动画旋转到给定的角度值 (或给定的角度参数)例如: 结合上面的例子,请参阅使用。
4.duration属性:[Number] – 指定使用animateTo的动画执行持续时间例如 (click on arrow):
$("#img").rotate({bind:{ click: function(){ $(this).rotate({ duration:6000, angle: 0, animateTo:100 }) } } });
5. step属性:[Function] – 每个动画步骤中执行的回调函数,当前角度值作为该函数的第一个参数
6. easing属性:[Function] – 默认 (see below) – Easing function used to make animation look more natural. It takes five parameters (x,t,b,c,d) to support easing from http://gsgd.co.uk/sandbox/jquery/easing/ (for more details please see documentation at their website). Remember to include easing plugin before using it in jQueryRotate!Default function:
function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }
Example (click on arrow):
$("#img").rotate({bind:{ click: function(){ $(this).rotate({ angle: 0, animateTo:180, easing: $.easing.easeInOutElastic }) } } });
7.callback属性:[Function] 动画完成时执行的回调函数例如 (click on arrow):
$("#img").rotate({bind:{ click: function(){ $(this).rotate({ angle: 0, animateTo:180, callback: function(){ alert(1) } }) } } });
getRotateAngle
这个函数只是简单地返回旋转对象当前的角度。
例如:
$("#img").rotate({ angle: 45, bind: { click : function(){ alert($(this).getRotateAngle()); } } });
stopRotate
这个函数只是简单地停止正在进行的旋转动画。
例如:
$("#img").rotate({ bind: { click: function(){ $("#img").rotate({ angle: 0, animateTo: 180, duration: 6000 }); setTimeout(function(){ $("#img").stopRotate(); }, 1000); } } });
jqueryrotate项目地址:http://code.google.com/p/jqueryrotate/
代码示例:http://code.google.com/p/jqueryrotate/wiki/Examples
测试程序打包上传!
相关推荐
jquery旋转插件rotate,方便,实用,易上手; jquery旋转插件rotate,方便,实用,易上手; jquery旋转插件rotate,方便,实用,易上手; jquery旋转插件rotate,方便,实用,易上手;
jQuery旋转插件jqueryrotate是一款jquery.rotate旋转插件。
js旋转插件jquery.rotate
跨浏览器控制图片旋转jquery插件jquery.rotate.js.zip 跨浏览器控制图片旋转jquery插件jquery.rotate.js.zip 跨浏览器控制图片旋转jquery插件jquery.rotate.js.zip
jqueryrotate--jQuery旋转插件及案例,内含案例和js,拿去就能用,一看就懂jquery的旋转特效
jquery rotate图片旋转插件制作转盘360度旋转抽奖代码.zip
jQuery旋转插件jqueryrotate是一款jquery.rotate旋转插件。
jquery-旋转使用 CSS 3 转换的非常轻量级的 jquery 旋转插件安装 bower install jquery-rotate用法 $ ( '#element' ) . rotate ( 90 ) ; // rotate element to 90 degrees$ ( '#element' ) . rotate ( ) ; // random...
网上发现一个很有意思的jQuery旋转插件,支持Internet Explorer 6.0+ 、Firefox 2.0 、Safari 3 、Opera 9 、Google Chrome,高级浏览器下使用Transform,低版本ie使用VML实现,感兴趣的朋友可以了解下
jQuery旋转风格切换的图片展示,点击控制按钮后,图片以旋转的方式切换至下一张,上一张自然消失,换一换形式,或许会让访客耳目一新。本效果基于jquery的旋转插件jquery.rotate.js实现。
这是一款用jquery.rotate.js旋转插件实现的动画效果,很不错 懒人站长推荐下载使用 使用方法: 1、将css样式引入到你的网页中 2、将body中的代码部分拷贝到你需要的地方即可 (js、图片采用绝对...
旋转切换的焦点图,基于jquery.rotate插件实现。在图片的两侧有左右控制的按钮,点击按钮后图片就切换,唯一不足的是不能自动切换,切换的方式是淡入淡出。如果你还对jquery.rotate.js用法不太熟悉的话,你可以下载...
dopelessRotate是一款基于jQuery的图片旋转插件,这款图片旋转插件功能非常强大,它不仅可以在加载的时候显示进度条,而且点击右侧的放大镜按钮可以查看原始大图,并且可以滑动鼠标来漫游大图的每一个细节。...
本焦点图效果是由jQuery插件中的jquery.rotate.js 实现的旋转切换的幻灯效果,在主图的两侧有左右控制的按钮,点击按钮后图片就切换,切换的方式是淡入淡出。如果你还对jquery.rotate.js用法不太熟悉的话,你可以...
以旋转方式切换图片的jquery图片展示,采用了一个jquery中的专用的旋转插件:jquery.rotate.js,旋转效果流畅自然,图片两侧显示控制按钮,可上一张、下一张切换,这款图片切换可用于图片网站、摄影网站、产品网站中...
主要介绍了jQuery图片旋转插件jQueryRotate.js用法,结合实例形式分析了图片旋转插件jQueryRotate.js用法,并附带了demo示例代码供读者下载,需要的朋友可以参考下