jQuery offsetParent() 方法
jQuery 教程
· 2019-03-28 09:38:57
实例
设置 <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()
点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html
数据结构算法与应用
塞尼 / 机械工业出版社 / 1999-3 / 49.00元
数据结构、算法与应用—C++语言描述(英文版),ISBN:9787111070177,作者:(美)塞尼 著一起来看看 《数据结构算法与应用》 这本书的介绍吧!
在线进制转换器
各进制数互转换器
HSV CMYK 转换工具
HSV CMYK互换工具