What would make offsetParent null?

前端 未结 7 887
清歌不尽
清歌不尽 2020-12-09 17:59

I am trying to do positioning in JavaScript. I am using a cumulative position function based on the classic quirksmode function that sums offsetTop and o

7条回答
  •  时光取名叫无心
    2020-12-09 18:43

    https://developer.mozilla.org/en/DOM/element.offsetParent

    offsetParent returns null when the element has style.display set to "none".

提交回复
热议问题