手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >jQuery实现动画效果circle实例
jQuery实现动画效果circle实例
摘要:本文实例讲述了jQuery实现动画效果circle的方法。分享给大家供大家参考。具体如下:这款jQuery实现动画效果circle,Goog...

本文实例讲述了jQuery实现动画效果circle的方法。分享给大家供大家参考。具体如下:

这款jQuery实现动画效果circle,Google+的圈子特效做的很不错,这里模仿下,时间有限,还有一个动画累积的问题没有解决。当然,是基于 jQuery的,纯JS 还没有这个能力呢。感兴趣的朋友可以加以完善试试。

运行效果截图如下:

jQuery实现动画效果circle实例1

具体代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>jQuery 动画效果 circle</title> <style> body { width:200px; margin:0 auto; margin-top:100px; background:#CCC; } #login{ position:relative; } .circle_l, .circle_b { width:148px; height:148px; border-radius:80px; background:blue; border:1px solid #FFF; } .circle_l { width:138px; height:138px; position:absolute; top:5px; left:5px; } .circle_b { background:lightblue; } </style> <script src="jquery-1.6.2.min.js" type="text/javascript"></script> </head> <body> <div id="login"> <div> <div></div> </div> </div> <script type="text/javascript"> $(".circle_b").hover(function(){ $(this).stop().animate({width:188,height:188,marginTop:"-20",marginLeft:"-20"},500) .css({"border-radius":"150px"}); $(".circle_l").stop().animate({marginTop:"20"},500) },function(){ $(this).stop().animate({width:148,height:148,marginTop:"0",marginLeft:"0"},500) .css({"border-radius":"100px"}); $(".circle_l").stop().animate({marginTop:"0"},500) }) </script> </body> </html>

希望本文所述对大家的jquery程序设计有所帮助。

【jQuery实现动画效果circle实例】相关文章:

JavaScript实现广告的关闭与显示效果实例

JQuery中Text方法用法实例分析

jquery实现弹出层效果实例

jQuery实现的多屏图像图层切换效果实例

js实现简单div拖拽功能实例

jQuery插件bgStretcher.js实现全屏背景特效

jQuery实现不断闪烁文字的方法

jquery中map函数遍历数组用法实例

JavaScript实现的MD5算法完整实例

jQuery实现延迟跳转的方法

精品推荐
分类导航