jQuery旋转插件,支持Internet Explorer 6.0 + 、Firefox 2.0、Safari 3、Opera 9、Google Chrome,高级浏览器下使用Transform,低版本ie使用VML实现。调用和方法: < strong> rotate(angle) angle参数:[Number]–默认为0–根据给定的角度旋转图片例如:

$("#img").rotate(45);

rotate(parameters) parameters参数:[Object]包含旋转参数的对象。支持的属性:

  1. 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:
        function(x,t,b,c,d){return-c*((t=t/d - 1) * t * t * t - 1) + b
    }

    Where:t:current time,b:begInnIng value,c:change In value,d:duration,x:unused No easing(linear easing):

        function(x,t,b,c,d){return(t/d) * c
    }

    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)}}});

用这个可以实现很多关于旋转的网页特效。

jQuery旋转插件的更多相关文章

  1. html5网页动画总结--jQuery旋转插件jqueryrotate

    CSS3 提供了多种变形效果,比如矩阵变形.位移.缩放.旋转和倾斜等等,让页面更加生动活泼有趣,不再一动不动.然后 IE10 以下版本的浏览器不支持 CSS3 变形,虽然 IE 有私有属性滤镜(fil ...

  2. jQuery旋转插件—rotate-摘自网友

    jQuery旋转插件—rotate 时间:2013年01月03日作者:愚人码头查看次数:5,660 views评论次数:6条评论 网上发现一个很有意思的jQuery旋转插件,支持Internet Ex ...

  3. jQuery旋转插件—rotate

    jQuery旋转插件,支持Internet Explorer 6.0+ .Firefox 2.0 .Safari 3 .Opera 9 .Google Chrome rotate(angle) 正值表 ...

  4. jQuery旋转插件jqueryrotate 图片旋转

    "jquery.rotate.min.js"是jQuery旋转rotate插件,支持Internet Explorer 6.0+ .Firefox 2.0 .Safari 3 .O ...

  5. jQuery旋转插件jquery.rotate.js 让图片旋转

    演示1 直接旋转一个角度 $('#img1').rotate(45); 演示2 鼠标移动效果 $('#img2').rotate({ bind : { mouseover : function(){ ...

  6. jquery旋转插件rotate参数说明

    具体可见:http://www.jianshu.com/p/b632a1ed6a57

  7. 13 款最棒的 jQuery 图像 360° 旋转插件

    在 web 页面上使用 jQuery 图像 360 度旋转插件是最美也是最方便的显示图像的方式.这些超级棒的 360° 图像选择插件允许用户更详细的分析产品或者文章.jQuery 图像旋转插件可以让用 ...

  8. Glide.js:响应式 & 触摸友好的 jQuery 滑块插件

    Glide.js 是一款响应式和对触摸友好的 jQuery 滑块.基于 CSS3 转换实现,并在低版本浏览器降级处理.Glide.js 简单,重量轻,快速,适用于智能手机,平板电脑和台式机.它支持 s ...

  9. Salvattore:CSS 驱动的 jQuery Masonry 插件

    Salvattore 是一个 jQuery 砌体的替代,使用 CSS 驱动的配置.Salvattore 根据您指定的列数组织你的 HTML 元素.容器中的每一个项目会一个接一个被放置在列内,只需要简单 ...

随机推荐

  1. 关于什么时候用pop什么时候用dismiss

    假如你是类似于这样跳转过来的self presentViewController: animated: completion:那么你回去的时候就要dismiss假如你是这样跳转过来的 self.nav ...

  2. 转:eclipse载入extjs4出现内存溢出错误的解决方法

    去掉.project文件中的以下部分:第一部分:<buildCommand>    <name>org.eclipse.wst.jsdt.core.javascriptVali ...

  3. 关于KeilC51的指针(参见, page 106-113, keil uv2 user's guide 09,2001)

    keil中的指针分为两种,一种是普通指针,兼容标准C语言的指针:另一种是我翻译成内存特殊指针(memory-specific pointers,翻译的不好:>) 一.普通指针 普通指针的定义方式 ...

  4. Java Tomcat SSL 服务端/客户端双向认证

    借花献佛:http://www.blogjava.net/icewee/archive/2012/06/04/379947.html

  5. fedora19配置 SSH 免密码登陆

    a.ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa b.cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys   ...

  6. war文件

    原文地址:http://blog.sina.com.cn/s/blog_4cbc6fdd0100fojv.html jar包和war包的区别:war是一个web模块,其中需要包括WEB-INF,是可以 ...

  7. DataTable与Linq相互转换

    DataTable通过dt.AsEnumerable()方法转换可用Linq查询,反之,Linq也可以转化为DataTableDataTable newDt = query1.CopyToDataTa ...

  8. 两个关于XML解析报错问题小记

    Caused by: org.xml.sax.SAXParseException: The string "--" is not permitted within comments ...

  9. (五)unity4.6Ugui中文教程文档-------概要-UGUI Interaction Components

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMDAxOTcxNw==/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...

  10. HDU 4280 Island Transport(网络流)

    转载请注明出处:http://blog.csdn.net/u012860063 题目链接:pid=4280">http://acm.hdu.edu.cn/showproblem.php ...