offsetParent()
            收藏:0  
            阅读:45
        
        
        jQuery offsetParent() 方法
实例
设置 <p> 元素的最近定位的祖先元素的背景颜色:
		$("button").click(function(){
$("p").offsetParent().css("background-color","red");
});
$("p").offsetParent().css("background-color","red");
});
定义和用法
offsetParent() 方法返回第一个定位的祖先元素。
提示:通过 jQuery 或 CSS 的 position 属性(relative、absolute 或 fixed)对元素进行定位。
语法
		$(selector).offsetParent()