2016-10-18 9 views
-1

私はオーバーフロースクロールとdiv要素を持っていると私は、この絵のようなスクロールバーのスタイルを変更したい:スクロールバーのスタイルを変更するには?

enter image description here

どのように私は、スクロールバーを変更できますか?

<div id="box" style="overflow:auto; width:200px; height:200px; border:1px solid black;"> 
 
1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10<br> 
 
11<br>12<br>13<br>14<br>15<br>16<br>17<br>18<br>19<br>20<br> 
 
21<br>22<br>23<br>24<br>25<br>26<br>27<br>28<br>29<br>30<br> 
 
</div>

+1

スクロールバープラグインを試してください。 https://noraesae.github.io/perfect-scrollbar/ –

+1

本、ツール、ソフトウェアライブラリ、プラグイン、チュートリアル、テクニックの説明、または他のオフサイトリソースの提供を提案、検索、または推奨する質問オフトピックのスタックオーバーフロースタックオーバーフロー –

答えて

0
For IE: 
    body { 
     scrollbar-face-color: #b46868; 
    } 

For webkit 

::-webkit-scrollbar-track { 
    background-color: #b46868; 
} /* the new scrollbar will have a flat appearance with the set background color */ 

::-webkit-scrollbar-thumb { 
    background-color: rgba(0, 0, 0, 0.2); 
} /* this will style the thumb, ignoring the track */ 

::-webkit-scrollbar-button { 
    background-color: #7c2929; 
} /* optionally, you can style the top and the bottom buttons 
(left and right for horizontal bars) */ 

::-webkit-scrollbar-corner { 
    background-color: black; 
} /* if both the vertical and the horizontal bars appear, then perhaps 
the right bottom corner also needs to be styled * 

あなたはfleXcrollでスクロールを変更することができます。これらのセレクタ付きhttp://www.hesido.com/web.php?page=customscrollbar

https://webdesign.tutsplus.com/articles/quick-tip-styling-scrollbars-to-match-your-ui-design--webdesign-9430

+0

このリンクは、質問に答えるかもしれませんが、ここでは、答えの重要な部分を含めると参照用のリンクを提供することをお勧めします。リンクされたページが変更された場合、リンクのみの回答は無効になります。 - [レビューの投稿](レビュー/低品質の記事/ 14018864) – morgul

+0

コメントありがとうございました –

0

uは... CSSで例えば

::-webkit-scrollbar 
::-webkit-scrollbar-button 
::-webkit-scrollbar-track 
::-webkit-scrollbar-track-piece 
::-webkit-scrollbar-thumb 
::-webkit-scrollbar-corner 
::-webkit-resizer 

をあなたのスクロールバーをカスタマイズすることができます:

::-webkit-scrollbar-track{ 
    width: 12px; 
} 

ちょうどそれらを試してみてください。この

チェックアウト

関連する問題