1. Overflow content overflow settings (set whether the set object displays a scroll bar) overflow-x setting for horizontal content overflow overflow-y settings for vertical content overflow The above three properties are set to visible (default value), scroll, hidden, and auto. 2. scrollbar-3d-light-color The color of the bright edge of the three-dimensional scroll bar (set the color of the scroll bar) scrollbar-arrow-colorThe color of the triangle arrow on the up and down buttons scrollbar-base-color The basic color of the scrollbar scrollbar-dark-shadow-color The color of the strong shadow of the three-dimensional scroll bar scrollbar-face-color The color of the protruding part of the three-dimensional scroll bar scrollbar-highlight-color The color of the blank part of the scrollbar scrollbar-shadow-color The color of the three-dimensional scroll bar shadow. We use several examples to explain the above style attributes: 1. Make sure that the browser window never has scroll bars <br />No horizontal scroll bar Copy code The code is as follows:<body style="overflow-x:hidden"> No vertical scroll bar Copy code The code is as follows:<body style="overflow-y:hidden"> No scroll bars Copy code The code is as follows:<body style="overflow-x:hidden;overflow-y:hidden"> or <body style="overflow:hidden"> 2. Set the scroll bar of the multi-line text box No horizontal scroll bar Copy code The code is as follows:<textarea style="overflow-x:hidden">< /textarea> No vertical scroll bar Copy code The code is as follows:< textarea style="overflow-y:hidden">< /textarea> No scroll bars Copy code The code is as follows:<textarea style="overflow-x:hidden;overflow-y:hidden">< /textarea> or < textarea style="overflow:hidden"></textarea> 3. Set the color of the window scroll bar <br />Set the color of the window scroll bar to red<body style="scrollbar-base-color:red"> scrollbar-base-color sets the basic color. Generally, you only need to set this one property to change the scroll bar color. Add a little special effect: Copy code The code is as follows:<body style="scrollbar-arrow-color:yellow;scrollbar-base-color:lightsalmon"> 4. Define a class in the style sheet file and call the style sheet Copy code The code is as follows:<style> .coolscrollbar{scrollbar-arrow-color:yellow;scrollbar-base-color:lightsalmon;} </style> Call it like this: Copy code The code is as follows:<textarea class="coolscrollbar">< /textarea> Textarea color and border settings: Copy code The code is as follows:<textarea style="border:red solid;border-width:1 1 1 1;color:#CCCCCC;">< /textarea> |
<<: Use the CSS border-radius property to set the arc
>>: JavaScript Basics Operators
Today, let's introduce several common text pr...
This article uses examples to describe MySQL dupl...
How to install flash in Linux 1. Visit the flash ...
Table of contents What is index pushdown? The pri...
1. Check the database time zone show variables li...
1. Introduction This article describes how to use...
This article uses an example to describe how to i...
Method 1: Use lsof command We can use the lsof co...
@vue+echarts realizes the flow effect of China ma...
Icon icon processing solution The goal of this re...
Anyone who has used Windows Remote Desktop to con...
This article mainly introduces: using Vue to impl...
Div basic layout <div class="main"&g...
It is very easy to delete a table in MySQL, but y...
In the article MySQL Optimization: Cache Optimiza...