最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jquery使用animate方法實(shí)現(xiàn)控制元素移動(dòng)

 更新時(shí)間:2015年03月27日 09:39:06   作者:上大王  
這篇文章主要介紹了jquery使用animate方法實(shí)現(xiàn)控制元素移動(dòng),涉及jQuery中animate方法的使用技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了jquery使用animate方法實(shí)現(xiàn)控制元素移動(dòng)。分享給大家供大家參考。具體分析如下:

通過(guò)jquery的animate方法控制元素移動(dòng),這里需要將元素的位置定義為relative, fixed, 或者 absolute!

<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js">
</script>
<script>
$(document).ready(function(){
 $("button").click(function(){
  $("div").animate({left:'250px'});
 });
});
</script>
</head>
<body>
<button>Start Animation</button>
<p>By default, all HTML elements have a static position,
and cannot be moved. To manipulate the position, 
remember to first set the CSS position property 
of the element to relative, fixed, or absolute!</p>
<div style="background:#98bf21;
height:100px;width:100px;position:absolute;">
</div>
</body>
</html>

希望本文所述對(duì)大家的jQuery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論

广汉市| 西吉县| 澄迈县| 海城市| 安徽省| 荥经县| 石景山区| 三门县| 漠河县| 泗洪县| 二连浩特市| 安国市| 天柱县| 三台县| 惠安县| 皋兰县| 寻甸| 丹阳市| 布尔津县| 长寿区| 乡宁县| 浦江县| 华容县| 泾川县| 泊头市| 醴陵市| 辰溪县| 水城县| 武乡县| 南汇区| 高碑店市| 安义县| 焦作市| 涟源市| 镇平县| 远安县| 华安县| 迭部县| 丰都县| 沾化县| 沙雅县|