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

.scrollLeft()

Contents:

.scrollLeft() 返回: Integer

描述: 為匹配的元素集合中獲取第一個元素的滾動條的水平位置。

  • version added: 1.2.6.scrollLeft()

水平滾動位置是和像素值以上所隱藏的滾動區(qū)相同的。(The horizontal scroll position is the same as the number of pixels that are hidden from view above the scrollable area.)如果滾動條是在非常左邊,或者這個元素沒有可滾動的,那么這個數(shù)字是0。

例子:

獲取段落的scrollLeft。

<!DOCTYPE html>
<html>
<head>
  <style>
    p { margin:10px;padding:5px;border:2px solid #666; }
    </style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <p>Hello</p><p></p>
<script>var p = $("p:first");
			$("p:last").text( "scrollLeft:" + p.scrollLeft() );

			</script>

</body>
</html>

Demo:

.scrollLeft( value ) 返回: jQuery

描述 為匹配的元素集合中每個元素設(shè)置滾動條的水平位置。

  • version added: 1.2.6.scrollLeft( value )

    value一個用來設(shè)置滾動條水平位置的正整數(shù)。

水平滾動位置是和像素值以上所隱藏的滾動區(qū)相同的。(The horizontal scroll position is the same as the number of pixels that are hidden from view above the scrollable area.) scrollLeft為每個匹配元素設(shè)置滾動條的水平位置。

Example:

設(shè)置一個div的scrollLeft。

<!DOCTYPE html>
<html>
<head>
  <style>
  div.demo {
  background:#CCCCCC none repeat scroll 0 0;
  border:3px solid #666666;
  margin:5px;
  padding:5px;
  position:relative;
  width:200px;
  height:100px;
  overflow:auto;
  }
  p { margin:10px;padding:5px;border:2px solid #666;width:1000px;height:1000px; }
	</style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <div class="demo"><h1>lalala</h1><p>Hello</p></div>
<script>$("div.demo").scrollLeft(300);
</script>

</body>
</html>

Demo:

jQuery 1.6 API 中文版腳本之家整理、修訂 (2011年6月)
波密县| 边坝县| 谷城县| 石林| 天峻县| 新津县| 安庆市| 桐乡市| 麻江县| 福鼎市| 定兴县| 济南市| 毕节市| 环江| 桐城市| 永顺县| 永登县| 和林格尔县| 昌黎县| 寿阳县| 延津县| 同江市| 柯坪县| 武乡县| 盐亭县| 甘德县| 工布江达县| 凌海市| 屯留县| 四子王旗| 扬州市| 嘉定区| 伊春市| 怀仁县| 兴仁县| 芜湖县| 田阳县| 黄梅县| 若羌县| 视频| 逊克县|