Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the properties and style settings of the DIV scroll bar

Shulou Source: shulou.com Published: 2022-06-02 13:37:20 10月01日 Update

This article introduces the relevant knowledge of "what are the properties and style settings of the DIV scroll bar?" in the operation of actual cases, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

DIV scroll bar properties and style settings

The so-called DIV scroll bar is to use the DIV tag to embed the CSS stylesheet and add the attribute value of overflow, so that when the content in the area regulated by div reaches a certain program, the scroll bar will come in handy. Its function is about to save page space, which is the so-called "shrinking ground".

When the content of the area defined by div reaches a certain level, embed the css stylesheet in the div tag, define the property values of overflow, and set the properties related to the DIV scroll bar.

Sample code:

.testDiv {border-style:solid; border-width:50px; border-color:pink; position:absolute; top:200px; left:300px; height:200px; width:300px; overFlow-x:scroll; overFlow-y:hidden; scrollBar-face-color:green; scrollBar-hightLight-color:red; scrollBar-3dLight-color:orange; scrollBar-darkshadow-color:blue; scrollBar-shadow-color:yellow; scrollBar-arrow-color:purple; scrollBar-track-color:black ScrollBar-base-color:pink;}

Note:

1.overFlow:

Visible saves the value, and there is no DIV scroll bar. It automatically expands the size of the region according to the content, that is, the defined area is invalid.

Scroll always displays scroll bars

Hidden has no scroll bar, and content outside the area is not visible.

Auto automatically determines whether to add scroll bars according to the content.

2.DIV scroll bar color properties:

Face-color: slider color

Hightlight-color: highlight color

3dlight-color: 3D ray color

Darkshadow-color: shadow color

Shadow-color: shadow color

Arrow-color: arrow color

Track-color: slide color

The main color of the base-color:DIV scroll bar, which contains scroll buttons and scroll sliders

3.overFlow-xoverFlow-y

Visible saves the value, and there is no DIV scroll bar. It automatically expands the size of the region according to the content, that is, the defined area is invalid.

Scroll always displays scroll bars

Hidden has no DIV scroll bar, and the content outside the area is not visible.

Auto automatically determines whether to add scroll bars according to the content.

This is the end of the content of "what are the properties and style settings of the DIV scroll bar". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Content color area attributes style way size that is more tags knowledge practicality learning and then code light function dilemma reality situation. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Docker NVidia Apple Shulou Information