Can CSS be used to hide the scroll-bar? How would you do this?
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
To disable vertical scroll bar just add :
overflow-y:hidden;
Find more about :overflow
You can accomplish this with a wrapper div that has it's overflow hidden, and the inner div set to auto.
To remove the inner div's scroll bar, you can pull it out of the outer div's viewport by applying a negative margin to the inner div. Then apply equal padding to the inner div so that the content stays in view.
JSFiddle
HTML
CSS
Use
css overflow property:Here are some more examples:
Cross Browser Approach to hiding the scrollbar.
Tested Edge, Chrome, Firefox, Safari
Hide scrollbar while still being able to scroll with mouse wheel! codepen
I wrote a webkit version with some options like auto hide, little version, scroll only-y or only-x
http://codepen.io/hicTech/pen/KmKrjb
Copy this CSS code to Customer Code for hiding Scrollbar