摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2011-11-10 23:02 zcjnever 阅读(500) 评论(0) 推荐(0)
摘要: offsetParent直接的将是影响元素位置的上级element,而parentElement与位置显示无关时dom中的上级element。例如: <BODY> <div style="border: 1px solid black;position:absolute;"> <form> <input type="checkbox" id="cc"> </form> </div> 这个例子中,“cc”元素的offsetParent是div,如果去掉div的pos 阅读全文
posted @ 2011-04-21 08:51 zcjnever 阅读(2377) 评论(0) 推荐(0)
摘要: 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-po 阅读全文
posted @ 2011-04-21 08:48 zcjnever 阅读(4456) 评论(0) 推荐(2)