How to change the scrollbar styles in Angular Material select?

前端 未结 4 1255
萌比男神i
萌比男神i 2021-02-07 19:48

We need help in changing the scrollbar in the Select component from Angular Material.

The following demo was implemented.

https://stackblitz.com/angular/bxbvndrp

4条回答
  •  臣服心动
    2021-02-07 20:45

    to change the color and width it worked for me -

    ::-webkit-scrollbar {
        width: 4px;
        overflow-y: scroll;
        background: grey;
        box-shadow: inset 0 0 4px #707070;
    }
    
    ::-webkit-scrollbar-thumb {
        background: blue;
        border-radius: 10px;
    }
    

    enter image description here

提交回复
热议问题