Use CSS to modify scrollbars
1. Settings when overflow content overflow
Settings when overflow-x horizontal content overflow
Settings when overflow-y vertical content overflow
The values set by the above three attributes are visible (default), scroll, hidden, and auto.
2. scrollbar-3d-light-color three-dimensional scrollbar bright edge color
scrollbar-arrow-color color of triangle arrow on top of button
scrollbar-base-color scrollbar basic color
scrollbar-dark-shadow-color three-dimensional scrollbar strong shadow color
scrollbar-face-color color of the convex part of the three-dimensional scrollbar
scrollbar-highlight-color color of blank part of scrollbar
scrollbar-shadow-color color of stereoscopic scrollbar shadow
The values set by the above seven attributes are color values, and you can use various expressions defined by the style sheet.
Using the above style definition content, we can specify whether the scroll bars are displayed and color styles of the browser window and multi-line text boxes. The first set of style attributes are used to set whether the scroll bar is displayed. The second set of style attributes are used to set the color of the scroll bar. The style attributes involved in this article can only be supported by ie. The second set of style attributes can only be supported by ie version 5.5, so please pay attention when debugging.
We will explain the above style properties through several examples:
1. Make the browser window never appear scrollbars
No horizontal scroll bar
<body style= overflow-x:hidden >
No vertical scroll bar
<body style= overflow-y:hidden >
No scrollbar
<body style= overflow-x:hidden;overflow-y:hidden > or <body style= overflow:hidden >
2. Set the scroll bar of multi-line text box
No horizontal scroll bar
Copy the code