HTML scroll bar textarea attribute setting

HTML scroll bar textarea attribute setting
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

Recommend

Linux common text processing commands and vim text editor

Today, let's introduce several common text pr...

Analysis of MySQL duplicate index and redundant index examples

This article uses examples to describe MySQL dupl...

How to install Linux flash

How to install flash in Linux 1. Visit the flash ...

Understanding MySQL index pushdown in five minutes

Table of contents What is index pushdown? The pri...

How to view and set the mysql time zone

1. Check the database time zone show variables li...

Tutorial on how to quickly deploy a Nebula Graph cluster using Docker swarm

1. Introduction This article describes how to use...

Summary of methods to check whether the port is open in Linux

Method 1: Use lsof command We can use the lsof co...

vue+echarts realizes the flow effect of China map (detailed steps)

@vue+echarts realizes the flow effect of China ma...

Vue.js handles Icon icons through components

Icon icon processing solution The goal of this re...

Vue implements tab navigation bar and supports left and right sliding function

This article mainly introduces: using Vue to impl...

How to delete a MySQL table

It is very easy to delete a table in MySQL, but y...

MySQL optimization connection optimization

In the article MySQL Optimization: Cache Optimiza...