


How to operate the width and height attributes of the page, visual area, screen, etc.
Jun 04, 2018 am 11:50 AMThis time I will show you how to operate the width and height properties of the page, visual area, and screen , and how to operate the width and height properties of the page, visual area, and screen Precautions What are they? Here are actual cases. Let’s take a look.
About some related width and height attributes of the page, visual area, screen, etc.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
1. clientHeight and clientWidth are used to describe the inner size of the element, which refers to the inner margin size of the element content, excluding the border (actually includes under IE), outer edge Distance, scroll bar part
2. offsetHeight and offsetWidth are used to describe the outer size of the element, which refers to the inner margin border of the element content, excluding the outer margin and scroll bar part
3 . clientTop and clientLeft return the horizontal and vertical distance between the edge of the padding and the outer edge of the border, that is, the left and top border width
4. offsetTop and offsetLeft represent the upper left corner of the element (borderOuter edge) and The distance between the upper left corner of the positioned parent container (offsetParent object)
I believe you have mastered the method after reading the case in this article, please pay attention for more exciting things Other related articles on php Chinese website!
Recommended reading:
H5 Canvas use case detailed explanation
How to use the javascript Date Format method
offsetWidth | clientWidth | scrollWidth |
offsetHeight | clientHeight | scrollHeight |
offsetLeft | clientLeft | scrollLeft |
offsetTop | clientTop | scrollTop |
The above is the detailed content of How to operate the width and height attributes of the page, visual area, screen, etc.. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Teach you how to turn off the automatic screen lock function in win10

How to adjust the color when the screen turns black and white. Detailed introduction: How to exit black and white mode on your mobile phone.

iPhone screenshots not working: How to fix it

Apple reveals iPhone 16 may have a larger display

How to deal with the black screen problem that occurs after increasing the screen resolution

How to close the 'Do not cover the top of the screen' Detailed explanation: How to close the 'Do not cover the top of the screen' message that appears frequently on your phone
