Scroll bar style for WebKit kernel in CSS3

Source: Internet
Author: User

The scroll bar style used in the project is adjusted to suit your style on the other's basis. (ie can debug the scroll bar style, Firefox can not debug at the moment)

::-webkit-scrollbar {  width: px; }/ * Track & Scroll thickness * /  ::-webkit-scrollbar-track {  background-color:#ddd; }/ * Track color * /  ::-webkit-scrollbar-thumb {  background-color: #333;} / * Scroll color * /  ::-webkit-scrollbar-thumb: Hover {  background-color: #000   }/ * Scroll hover color * /  ::-webkit-scrollbar-thumb: Active {  background-color: #000   }/ * Scroll Click & drag Color * /

Share the WebKit kernel scroll bar style in my project (Chrome,sarfrai)
Demo:http://codepen.io/tianzi77/pen/mjnpme

*{  margin: 0;         padding: 0; }        Div {  margin: px Auto;             padding: tenpx;             width: px;             height: px;         Border: 1px solid #ddd; }        P {  height: + px; }        / * Define the scroll bar style yourself * /        . Webkit-scrollbar {  overflow: hidden; }        . Webkit-scrollbar: Hover {  overflow-y: scroll; }        . Webkit-scrollbar::-webkit-scrollbar {  width: 7px;             height: 7px; / * Set the width/height of the entire scroll bar * / }                . Webkit-scrollbar::-webkit-scrollbar-track {  background-color: transparent; / * Entire scrolling background color * / }                . Webkit-scrollbar::-webkit-scrollbar-thumb {  background-color: #9e9e9e; /*7px scroll bar background color * /             Border-radius: 7px;         Border: 1px solid #fff; }                    . Webkit-scrollbar::-webkit-scrollbar-thumb: Hover {  background-color: #525252; }

Scroll bar style for WebKit kernel in CSS3

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.