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,當它顯示的內容超出範圍時,滾動條就會被顯示出來。
?