Css force-hide the browser scroll bar

Source: Internet
Author: User

Force display of the scroll bar:

The code is as follows: Copy code

Html {overflow: scroll ;}

Force hide the scroll bar:

The code is as follows: Copy code

Html {overflow: hidden ;}

Hide the horizontal scroll bar of IE:

The code is as follows: Copy code

Html {overflow-x: hidden ;}

Hide the vertical scroll bar of IE:

The code is as follows: Copy code

Html {overflow-y: hidden ;}

Forcibly display the horizontal scroll bar of IE:

The code is as follows: Copy code

Html {overflow-x: scroll ;}

Forcibly display the vertical scroll bar of IE:

The code is as follows: Copy code

Html {overflow-y: scroll ;}

Force Display of Mozilla horizontal scroll bar:

The code is as follows: Copy code

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

Note: Only the horizontal scroll bar is forcibly displayed. That is to say, even if the vertical scroll bar needs to be displayed, the vertical scroll bar will not appear.

Force Display of Mozilla's vertical scroll bar:

The code is as follows: Copy code

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

Note: only the vertical scroll bar is displayed. That is to say, the horizontal scroll bar does not appear even if the horizontal scroll bar needs to be displayed.

So many of us will have noticed an html. All the hidden browsers that scroll are defined by html.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.