Hide a custom scroll bar without scrolling. scroll a custom scroll bar.

Source: Internet
Author: User

Hide a custom scroll bar without scrolling. scroll a custom scroll bar.

Some browsers now support custom scroll bars, making them a rescue for designers and perfectionists. After the new version was launched, the designer raised a new requirement: Hide the scroll bar on the right of the navigation bar without scrolling(A small video is also sent to indicate the effect ). Is the crude line on the right side: Chrome/Safari/Firefox browsers are tested on mac systems, and the scroll bars are hidden by default when these systems do not scroll. For example

It turns out that the custom scroll bar shields this feature of the system.

Solution: Set the outer package layer to overflow-y: hidden by default. When the hover effect is set, the overflow: auto is shown as follows:
<! DOCTYPE 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.