How to disable scroll bars in css: 1. Add "scroll="no"" to
to hide the scroll bars; 2. Set "<boby scroll="auto">" to hide the scroll bars when not needed ;3. Hide the scroll bar through the overflow attribute.
The operating environment of this article: Windows7 system, HTML5&&CSS3 version, DELL G3 computer
CSS disable scroll bar
CSS disables scroll bars. There are 4 methods, as follows:
1. Completely hide
Add scroll="no" in
<boby scroll="no">
2. Hide when not needed
means that when the width or height of the browser window is greater than the width or height of the page, the scroll bar will not be displayed;
Otherwise, it will be displayed;
<boby scroll="auto">
3. Style sheet method (this is easier to use)
Add style="overflow-x:hidden" to
Add style="overflow-y:hidden" to hide the vertical scroll bar.
Add
<style> html { overflow-x:hidden; } </style>
4 to the included page 4. Another method
<style type="text/css"> body { overflow-x:hidden; overflow-y:hidden; } </style> <style type="text/css"> html { overflow-x:hidden; overflow-y:hidden; } </style>
Recommended learning: "css video tutorial"
The above is the detailed content of How to disable scroll bars in css. For more information, please follow other related articles on the PHP Chinese website!