Document. Body. ClientWidth = = > body object width. The document body. ClientHeight = = > object body height document. The documentElement. ClientWidth = = > Visible region width of the document. The documentElement. ClientHeight = = > highly visible area
Web page visible region wide: document. Body. High clientWidth page visible area: document. Body. ClientHeight page visible region wide: Document. The body. The offsetWidth (including line width) page visible area high: the document. The body, offsetHeight (including high edges) page of text in full width: Document. The body. The high scrollWidth web page text full text: the document. The body. ScrollHeight swept to high: web page document. The body. The scrollTop web swept to the left: Document. Body. ScrollLeft web page on the body: window. ScreenTop page body left: window. ScreenLeft high screen resolution: window. The screen. The height of screen resolution wide: Window. The screen. The screen width available workspace height: window. Screen. AvailHeight screen available workspace width: window. Screen. AvailWidth
$(document).height(); $(document).height() OuterHeight (true) $(document.body).outerheight (true) $(document.body).outerheight (true Padding margin $(window).width() // the width of the viewable area $(document).width( $(document.body).width() $(document.body).outerWidth(true) $(document.body).outerWidth(true
HTML precise positioning: scrollLeft scrollWidth, clientWidth, offsetWidth scrollHeight: get rolling height of objects. ScrollLeft: sets or gets the distance between the left edge of the object and the leftmost part of the currently visible content in the window scrollTop: sets or gets the distance between the top part of the object and the top part of the currently visible content in the window scrollWidth: gets the scrollWidth of the object OffsetHeight: Gets the height of the object relative to the layout or the parent coordinate specified by the parent coordinate offsetLeft: Gets the computed left position of the object relative to the layout or the parent coordinate specified by the offsetParent attribute OffsetTop: Gets the top calculated position of the object relative to the layout or parent specified by the offsetTop property Event. The vertical coordinate document offsetY relative container. DocumentElement. The scrollTop value of the vertical scroll event. ClientX + document. The documentElement. ScrollTop The amount of horizontal + vertical scrolling relative to the document