Home > Web Front-end > HTML Tutorial > client/scroll/offset width/height/top/left - Remember the first blog_html/css_WEB-ITnose

client/scroll/offset width/height/top/left - Remember the first blog_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:00:21
Original
1311 people have browsed it

client/scroll/offset width/height/top/left (The box model is contentBox, and the positioning origin is the intersection point of the outermost border of the upper left corner of the element)

clientWidth width left padding Right padding (if there is a vertical scroll bar, then subtract 17px)
                                                                                                use   with use with use using           using   use   with   use   use         use   using   use   use   use             using           using           use   use   use  -                                                                            🎜> clientLeft border-left-width left border width
offsetHeight Same as below
offsetWidth borderLeftWidth paddingLeft width paddingRight borderRightWidth
offsetLeft The origin of the current element is relative to the upper left corner of the positioned parent element Left offset of the innermost intersection point of the border
offsetTop The upper offset of the origin of the current element relative to the innermost focus of the upper left corner border of the positioned parent element
offsetParent relative to the offset parent element
scrollHeight
If the element does not have a vertical scroll bar, paddingLeft width paddingRight.
If there is a vertical scroll bar, it is related to the width occupied by the content. It is not clear how to calculate it.
scrollWidth
Similar to the above
scrollLeft The length of the horizontal scroll bar
scrollTop The length of the vertical scroll bar

>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template