亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Javascript拖拽系列文章1之offsetParent屬性第1/3頁

 更新時(shí)間:2008年09月22日 15:11:51   作者:  
這個(gè)系列文章主要是講述實(shí)現(xiàn)Javascript拖拽功能的基礎(chǔ)知識(shí),并將在最后給出一個(gè)完整的示例。適合對(duì)拖拽完全不懂的人閱讀
第一篇就先講講Javascript中的offsetParent屬性吧。
支持的瀏覽器:Internet Explorer 4.0+,Mozilla 1.0+,Netscape 6.0+,Opera 7.0+,Safari 1.0+
element.offsetParent
Summary
offsetParent returns a reference to the object which is the closest (nearest in the containment hierarchy) positioned containing element. If the element is non-positioned, the root element (html in standards compliant mode; body in quirks rendering mode) is the offsetParent. offsetParent returns null when the element has style.display set to "none".
Syntax
parentObj = element.offsetParent
Parameters
· parentObj is an object reference to the element in which the current element is offset.
Specification
DOM Level 0. Not part of specification.
節(jié)選自Mozilla Developer Center網(wǎng)站
翻譯如下:
element.offsetParent
總結(jié)
offsetParent屬性返回一個(gè)對(duì)象的引用,這個(gè)對(duì)象是距離調(diào)用offsetParent的元素最近的(在包含層次中最靠近的),并且是已進(jìn)行過CSS定位的容器元素。 如果這個(gè)容器元素未進(jìn)行CSS定位, 則offsetParent屬性的取值為根元素(在標(biāo)準(zhǔn)兼容模式下為html元素;在怪異呈現(xiàn)模式下為body元素)的引用。 當(dāng)容器元素的style.display 被設(shè)置為 "none"時(shí)(譯注:IE和Opera除外),offsetParent屬性 返回 null 。
句法
parentObj = element.offsetParent
變量
· parentObj 是一個(gè)元素的引用,當(dāng)前元素的偏移量在其中計(jì)算。
規(guī)范
DOM Level 0. 并非規(guī)范的一部分.


[Ctrl+A 全選 注:引入外部Js需再刷新一下頁面才能執(zhí)行]

相關(guān)文章

最新評(píng)論