亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

jQuery ??? ?? ????? ??

jQuery ????? - animate() ???

jQuery animate() ???? ??? ?? ?????? ??? ? ?????.

??: ??

$(selector).animate({params},speed,callback);

?? params ????? ?????? ???? CSS ??? ?????.

??? ?? ????? ??? ?? ??? ?????. "??", "??" ?? ??? ?? ??? ? ????.

??? ?? ????? ?????? ??? ? ??? ??? ?????.

?? ???? ?? ??? 250??? ? ??? <div> ??? ???? ???? animate() ???? ??? ??? ?????.

<!DOCTYPE html>  
<html>  
<head>  
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>

<script>  
$(document).ready(function(){  
  $("button").click(function(){  
    $("div").animate({left:'250px'});  
  });  
});  
</script>  
</head>  
<body>  
<button>開始動畫</button>  
<p>默認(rèn)情況下,所有 HTML 元素的位置都是靜態(tài)的,并且無法移動。如需對位置進(jìn)行操作,記得首先把元素的 CSS position 屬性設(shè)置為 relative、fixed 或 absolute。</p>  
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">  
</div>  
</body>  
</html>

QQ截圖20161024092524.png

?: ????? ?? HTML ??? ??? ????? ??? ? ????. ??? ?? ????? ?? ??? CSS ?? ??? ??, ?? ?? ??? ???? ???!

jQuery animate() - ?? ?? ??

????? ?? ???? ?? ?? ??? ??? ??? ? ????.

<!DOCTYPE html>  
<html>  
<head>  
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>  
 
<script>  
$(document).ready(function(){  
  $("button").click(function(){  
    $("div").animate({  
      left:'250px',  
      opacity:'0.5',  
      height:'150px',  
      width:'150px'  
    });  
  });  
});  
</script>  
</head>  
<body>  
<button>開始動畫</button>  
<p>默認(rèn)情況下,所有 HTML 元素的位置都是靜態(tài)的,并且無法移動。如需對位置進(jìn)行操作,記得首先把元素的 CSS position 屬性設(shè)置為 relative、fixed 或 absolute。</p>  
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">  
</div>  
</body>

QQ截圖20161024092556.png

?: animate() ???? ??? ? ????. ??? ?? CSS ??? ????? ???? ? ??? ??? ?? ????. animate()? ??? ? ?? ?? ??? Camel ???? ???? ???? ???. ?? ?? padding-left ?? paddingLeft? ???? ?? margin- ?? marginRight? ???? ???. ??? ?? ?? ?? jQuery ??????? ?? ?????? ???? ?? ????. ?? ?????? ???? ?? ?? jQuery.com?? ?? ????? ????? ?????? ???.

jQuery animate() - ?? ? ?? ??

?? ?? ??? ?? ????(?? ??? ?? ?? ??????). ? ?? += ?? -=? ???? ???.

<!DOCTYPE html>  
<html>  
<head>  
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>  
$(document).ready(function(){  
  $("button").click(function(){  
    $("div").animate({  
      left:'250px',  
      height:'+=150px',  
      width:'+=150px'  
    });  
  });  
});  
</script>  
</head>  
<body>  
<button>開始動畫</button>  
<p>默認(rèn)情況下,所有 HTML 元素的位置都是靜態(tài)的,并且無法移動。如需對位置進(jìn)行操作,記得首先把元素的 CSS position 屬性設(shè)置為 relative、fixed 或 absolute。</p>  
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">  
</div>  
</body>  
</html>

QQ截圖20161024092620.png

jQuery animate() - ?? ??? ? ?? ??


?? ?? "??", "???" ?? "??"?? ?????? ?? ????.

<!DOCTYPE html>  
<html>  
<head>  
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script> 
<script>  
$(document).ready(function(){  
  $("button").click(function(){  
    $("div").animate({  
      height:'toggle'  
    });  
  });  
});  
</script>  
</head>  
<body>  
<button>開始動畫</button>  
<p>默認(rèn)情況下,所有 HTML 元素的位置都是靜態(tài)的,并且無法移動。如需對位置進(jìn)行操作,記得首先把元素的 CSS position 屬性設(shè)置為 relative、fixed 或 absolute。</p>  
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">  
</div>  
</body>  
</html>

QQ截圖20161024092639.png

jQuery animate() - ??? ?? ??

????? jQuery? ?????? ?? ??? ??? ?????. ?, ?? ?? animate() ??? ??? ???? jQuery? ?? ??? ??? ???? "??" ???? ?????. ?? ?? ??? ????? ??? ??? ?????.

?: ?? ?? ?????? ??? ???? ??? ??? ??? ???? ????

<!DOCTYPE html>  
<html>  
<head>  
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>  
$(document).ready(function(){  
  $("button").click(function(){  
    var div=$("div");  
    div.animate({height:'300px',opacity:'0.4'},"slow");  
    div.animate({width:'300px',opacity:'0.8'},"slow");  
    div.animate({height:'100px',opacity:'0.4'},"slow");  
    div.animate({width:'100px',opacity:'0.8'},"slow");  
  });  
});  
</script>  
</head>  
<body>  
<button>開始動畫</button>  
<p>默認(rèn)情況下,所有 HTML 元素的位置都是靜態(tài)的,并且無法移動。如需對位置進(jìn)行操作,記得首先把元素的 CSS position 屬性設(shè)置為 relative、fixed 或 absolute。</p>  
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">  
</div>  
</body>  
</html>

QQ截圖20161024092702.png

???? ??
||
<!doctype html> <html lang="zh"> <head> <meta charset="utf-8"/> <title>jQuery Animation - fadeTo </title> <script src="http://code.jquery.com/jquery-3.1.1.min.js"></script> <script> $(document).ready(function() { $("#divPop").animate( { "opacity": "hide", "width": $(window).width()-100 , "height": $(window).height()-100 }, 2000 ); }); </script> </head> <body> <div id="divPop" style="background-color: #f0f0f0; border: solid 1px #000000; width: 300px; height: 100px; position:absolute;"> <div style="text-align: center;">pop div</div> </div> </body> </html>