Hide scrollbars in styles

Time:2021-2-10

There is a long page in the project, and the first part is a carousel component diagram. Because the page content is more, the scroll bar will appear. At this time, the scroll bar will appear on the right side of the carousel component, which will be very ugly. It needs a hidden scroll bar operation, and a few lines of simple code in CSS.

//Chrome, Safari environment
.container::-webkit-scrollbar{
    display:none;
}
//Ie10 + Environment
.container{
    -ms-overflow-style:none;
}
//Firebox environment
.container{
    overflow: -moz-scrollbars-none;
}

Recommended Today

Monkey patch monkey patch programming method and its application in Ruby

What ismonkey patch (Monkey Patch)? In a dynamic language, functions are added and changed without modifying the source code. Purpose of using monkey patch:1. Additional function2. Function change3. Fix program errors4. Add a hook to execute some other processing while executing a method, such as printing logs, realizing AOP, etc,5. Cache, when the amount of […]