Code used to control the color of a browser scroll bar in the CSS style of a scroll bar

Source: Internet
Author: User

When you create a website, you want to modify the color of the scroll bar on the right of the browser to beautify the website interface.CodeIt cannot be implemented. We need to use CSS to control the style of the scroll bar.

If you want to modify the color of the browser scroll bar, We can insert the following code into the CSS so that the scroll bar will change color.

The Code is as follows: (put it in the body. If not, put it in the HTML Tag .)

Scrollbar-face-color: # dddddd;/* color of the protruding part of the browser's right scroll bar */
Scrollbar-Highlight-color: # ffffff;/* color of the blank area of the browser's right scroll bar */

Scrollbar-shadow-color: # ffffff;/* color of the shadow of the three-dimensional scroll bar on the right of the browser */

Scrollbar-3dlight-color: # eeeeee;/* color of the bright side of the browser's right scroll bar */

Scrollbar-arrow-color: # eeeeee;/* color of the upper and lower arrow of the browser's scroll bar */

Scrollbar-track-color: # f7f7f7;/* background color of the scroll bar on the right of the browser */

Scrollbar-darkshadow-color: # eeeeee;/* color of the strong shadow of the scroll bar */

For example:

Body {xxx; XXX;} or HTML {xxx; XXX ;}

Common effects:

Scrollbar-Highlight-color: #008000;
Scrollbar-shadow-color: #008000;
Scrollbar-3dlight-color: #000000;
Scrollbar-arrow-color: #000000;
Scrollbar-track-color: #000000;
Scrollbar-darkshadow-color: #000000;
Scrollbar-face-color: #000000;

-----------

 

 

Illustration:

Insert the code into CSS, and then you will see that the color of the browser scroll bar where your website is located has changed. Is it very beautiful?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.