我正在使用带有材质设计的angular 8创建一个网页。我正在使用mat-select来显示各种选项。但是它显示滚动条,因为mat-select的最大高度为256px。我想隐藏滚动条,但要启用滚动功能。我不想增加mat-select-panel的高度。 我已经尝试了以下代码,但到目前为止还没有运气。
审判1 ::
::ng-deep {
.mat-select-panel-wrap {
overflow: hidden !important;
}
.mat-select-panel {
overflow-y: auto !important;
}
}
试用2 ::
::-webkit-scrollbar {
display: none !important;
background: transparent !important;
}
答案 0 :(得分:0)
您需要更改row_number()
而不是webkit-scrollbar-track
尝试一下:
webkit-scrollbar