Home > Web Front-end > HTML Tutorial > The differences between scrollHeight, offsetHeight and clientHeight in various browsers in web design_html/css_WEB-ITnose

The differences between scrollHeight, offsetHeight and clientHeight in various browsers in web design_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:44:42
Original
1321 people have browsed it

When the four major browsers chrome, firefox, ie, and opera have scroll bars on the web page:

clientHeight refers to the visible height in each browser

When the actual content height of the web page is greater than clientHeight, chrome, firefox, ie, and opera all set scrollHeight and offsetHeight as the height of the web page content, specifically the actual content height, scroll bar height, and web page border height

When the actual content height of the web page is less than clientHeight, chrome, firefox, ie, and opera all set scrollHeight to clientHeight.

chrome, firefox, and opera all set offsetHeight to the actual height of the web page content, specifically the actual content. Height The height of the scroll bar is the height of the web page border. IE11 sets offsetHeight to ClientHeight





                                                                                                                                                  {
                                                                                         gt ;fasdf


fasdfasd



< /html>






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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template