CSS customized scroll bar in div

后端 未结 19 1416
夕颜
夕颜 2020-11-21 11:05

How can I customize a scroll bar via CSS (Cascading Style Sheets) for one div and not the whole page?

19条回答
  •  醉酒成梦
    2020-11-21 12:00

    Use Only CSS work in Firefox +64

    .mycoldiv{
        scrollbar-color: white rebeccapurple;
        scrollbar-width: thin;
        display: block;
        height:400px;
        overflow-x: auto;
    }
    

    More info: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Scrollbars

提交回复
热议问题