这里我们记录和分析一下js中的parentNode和offsetparent
第一个parentNode我们经常用,知道是获取元素父节点的方法,但offsetparent就不经常用了,我也是刚学到,所以在这里记录一下,以防以后用到,而自己又刚好忘掉。
js中的parentNode可以获取子元素的父节点
offsetparent可以获取被定位的元素的父节点
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!