中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

jQuery offsetParent() 方法

jQuery 遍歷方法 jQuery 遍歷方法

實例

設(shè)置 <p> 元素的最近的被定位的父元素的背景顏色:

$("button").click(function(){
$("p").offsetParent().css("background-color","red");
});

運行代碼 ?

定義和用法

offsetParent() 方法返回第一個被定位的父元素。

提示:元素可通過 jQuery 或 CSS 的 position 屬性(relative、absolute 或 fixed)來定位。


語法

$(selector).offsetParent()

jQuery 遍歷方法 jQuery 遍歷方法

其他擴展