对于javascript里面的一些这方面的东西,每次看程序,自己写程序的时候遇到时都不知道是什么意思,今天特意找出来,看看虽然不明白,但还是要写出来
一.Client方面
1.clientHeight Read-only numeric value indicating the height of the element’s content area in pixels
2.clientLeft Read-only numeric value indicating the difference between the offsetLeft property and the beginning of the element’s content area, in pixels
3.clientTop Read-only numeric value indicating the difference between the offsetTop property and the beginning of the element’s content area, in pixels
4..clientWidth-only numeric value indicating the width of the element’s content area in pixels
二.offset方面
5.offsetHeight Read-only numeric value indicating the height of the element in pixels.
6.offsetLeft Read-only numeric value indicating the pixel offset of the left edge of the element, relative to its offsetParent
7.offsetParent Read-only reference to the object relative to which the offsetHeight/Width/Left/Top is calculated
8.offsetTop Read-only numeric value indicating the pixel offset of the top edge of the element, relative to its offsetParent
9offsetWidth Read-only numeric value indicating the width of the element in pixels
三.一般
position | Defines the type of positioning used for an element: static (default), absolute, relative, fixed, or inherit. Most often absolute is used to set the exact position of an element regardless of document flow. |
Top | Defines the position of the object from the top of the enclosing region. For most objects, this should be from the top of the content area of the browser window. |
Left | Defines the position of the object from the left of the enclosing region, most often the left of the browser window itself. |
height | Defines the height of an element. With positioned items, a measure in pixels (px) is often used, though others like percentage (%) are also possible. |
width | Defines the width of an element. With positioned items, a measure in pixels (px) is often used. |