欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery實(shí)現(xiàn)動畫效果circle實(shí)例

 更新時(shí)間:2015年08月06日 17:54:01   作者:皮蛋  
這篇文章主要介紹了jQuery實(shí)現(xiàn)動畫效果circle的方法,涉及jquery鼠標(biāo)事件及頁面動畫操作相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

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

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

運(yùn)行效果截圖如下:

具體代碼如下:

<!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程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評論