亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

返回值:Objectoffset([coordinates])

概述

獲取匹配元素在當前視口的相對偏移。

返回的對象包含兩個整型屬性:top 和 left,以像素計。此方法只對可見元素有效。

參數

coordinates{top,left}ObjectV1.4

必需。規(guī)定以像素計的 top 和 left 坐標。

可能的值:

  • 值對,比如 {top:100,left:0}
  • 帶有 top 和 left 屬性的對象

function(index,coords)functionV1.4

規(guī)定返回被選元素新偏移坐標的函數。

  • index - 可選。接受選擇器的 index 位置
  • oldvalue - 可選。接受選擇器的當前坐標

示例

無參數描述:

獲取第二段的偏移

HTML 代碼:
<p>Hello</p><p>2nd Paragraph</p>
jQuery 代碼:
var p = $("p:last");
var offset = p.offset();
p.html( "left: " + offset.left + ", top: " + offset.top );
結果:
<p>Hello</p><p>left: 0, top: 35</p>

參數coordinates 描述:

獲取第二段的偏移

HTML 代碼:
<p>Hello</p><p>2nd Paragraph</p>
jQuery 代碼:
$("p:last").offset({ top: 10, left: 30 });