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
WBOYOriginal
2016-06-24 11:44:421323browse

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>






Statement:
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
Previous article:stylesheet_html/css_WEB-ITnoseNext article:stylesheet_html/css_WEB-ITnose

Related articles

See more