国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

jQuery實現動畫效果circle實例

2019-11-20 11:53:45
字體:
來源:轉載
供稿:網友

本文實例講述了jQuery實現動畫效果circle的方法。分享給大家供大家參考。具體如下:

這款jQuery實現動畫效果circle,Google+的圈子特效做的很不錯,這里模仿下,時間有限,還有一個動畫累積的問題沒有解決。當然,是基于 jQuery的,純JS 還沒有這個能力呢。感興趣的朋友可以加以完善試試。

運行效果截圖如下:

具體代碼如下:

<!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 class="circle_b">    <div class="circle_l"></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程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 惠东县| 济宁市| 论坛| 乌兰察布市| 平潭县| 芜湖县| 沁阳市| 泸定县| 金平| 唐山市| 建阳市| 黎川县| 屯门区| 金塔县| 永德县| 崇州市| 尖扎县| 石城县| 清徐县| 凉城县| 伊吾县| 株洲县| 峡江县| 交城县| 固原市| 嫩江县| 酒泉市| 基隆市| 黔江区| 和硕县| 新宾| 泾源县| 祁连县| 龙口市| 重庆市| 黄平县| 那坡县| 云和县| 噶尔县| 铜山县| 六枝特区|