理解DHTML網頁中元素的位置和大小關係

MSDN上關於DOM(Dynamic HTML Object Model,文檔對象模型)中元素的位置和大小關係圖,我覺得很有用,就貼出來了:

英文原文:

Measuring Element Dimension and Location


The following section is designed to help Web authors understand how to access the dimension and location of elements on the page through the Dynamic HTML (DHTML) Object Model.

Understanding Properties That Measure Element Dimension and Location

The following diagram of a sample page shows the DHTML Object Model properties that are related to the dimension and location of elements. The sample page contains a DIV element that is relatively positioned on the page. Since the overflow attribute of the DIV has been set to scroll and it contains more content than can be displayed within its limited client area, scroll bars are displayed.

試着翻譯一下,大家將就着看吧。

測量元素的大小和位置


下面的設計用來幫助web作者如何通過文檔對象模型(DOM)來存取網頁元素的大小和位置。

理解測量大小和位置的屬性

下圖顯示了文檔對象模型中有關元素的位置和大小關係的屬性。頁面包含一個相對定位的DIV標籤。因爲DIV的overflow屬性已設置爲scroll,當它顯示的內容超出範圍時,滾動條就會被顯示出來。

?

引用的MSDN地址:mk:@MSITStore:D:/Program%20Files/Microsoft%20Visual%20Studio/MSDN/2000JUL/1033/inet.chm::/workshop/author/om/measuring.htm

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章