Home >Web Front-end >HTML Tutorial >html about forced display and hiding the browser's scroll bar_html/css_WEB-ITnose

html about forced display and hiding the browser's scroll bar_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:40:231322browse

The browser's scroll bar is not needed in some special displays, so it must be hidden. This article mainly introduces some implementation codes for hiding or displaying IE's horizontal or vertical scroll bar. , friends who need to know more can refer to it:

The relevant css code is as follows:

//Forcibly display the scroll bar:

html { overflow: scroll; }

//Force to hide the scroll bar:

html { overflow: hidden; }

//Hide IE’s horizontal scroll bar:

html { overflow-x: hidden ; }

//Hide IE’s vertical scroll bar:

html { overflow-y: hidden; }

//Force display of IE’s horizontal scroll bar:

html { overflow-x: scroll; }

//Force display of IE’s vertical scroll bar:

html { overflow-y: scroll; }

//Force the display of Mozilla's horizontal scroll bar:

html { overflow:-moz-scrollbars-horizontal; }

//Note: Only force the display of the horizontal scroll bar. In other words, even if When the vertical scroll bar needs to be displayed, the vertical scroll bar will not appear.

//Force to display Mozilla’s vertical scroll bar:

html { overflow:-moz-scrollbars-vertical; }

//Note: Only the vertical scroll bar is forced to be displayed. In other words, even when the horizontal scroll bar needs to be displayed, the horizontal scroll bar will not appear.

Letuo professionally provides Guangzhou website design, Guangzhou website production, mobile website construction, WeChat website construction, html5 and other services, customers in need can contact us directly!

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