Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Css3 / webkit: how do I change the size of the scroll bar slider?

Tags:

css

webkit

fiddle: http://jsfiddle.net/vVJGD/

::-webkit-scrollbar{
    width: 10px;
    padding-top: 40px;
}

::-webkit-scrollbar-track{
    -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0.3);
    border: 1px solid black;
    background: rgb(41,41,41);
    border-radius: 10px;

}
::-webkit-scrollbar-thumb{
    border-radius:10px;
    height: 30px;
    width: 8px;
    border: 1px solid black;
    background: rgb(111,111,111);
    -webkit-box-shadow: 0 1px 1px rgb(0,0,0);
    background: -webkit-linear-gradient(rgb(200,200,200), rgb(150,150,150));
}

::-webkit-scrollbar-track-piece {
    height: 30px;
}

I've tried to set the height via track-piece and thumb, but I don't think that's the correct way.

Anyone know the secret? I didn't find anything on google this specific.

like image 511
NullVoxPopuli Avatar asked Feb 10 '12 18:02

NullVoxPopuli


1 Answers

Set the height and width properties: http://jsfiddle.net/vVJGD/8/, Webkit will assign them to the appropriate orientation.

like image 64
Blender Avatar answered Oct 05 '22 23:10

Blender