當調用元素 A 的 offsetParent 屬性時,必須按以下算法返回元素。 以下任一條件為真時,返回 null,并停止本算法。 A 是根元素。 A是 HTML 的 body 元素。 元素A的 position 屬性計算值是 fixed。注 1 如果A 是 HTML 元素 area,并且在其上級元素鏈中有 HTML 元素 map,返回上級元素鏈中距 A 最近的 HTML 元...
Most of the time the offsetParent property returns the body object. Note In Microsoft? Internet Explorer 5, the offsetParent property returns the table object for the td object; in Internet Explorer 4.0 it returns the tr object. You can use the parentElement property to retrieve the immediate...