Eli*_*ock 5 typescript angular-material angular
如何在 Material Angular 中创建水平滚动而不是占用多行的水平芯片列表?
这段代码解决了我们的问题:
(我们也用encapsulation: ViewEncapsulation.None
在我们的组件上)。
::-webkit-scrollbar {
height: 0;
}
div.mat-chip-list-wrapper {
flex-wrap: nowrap;
overflow-x: auto;
width: 165px;
white-space: nowrap;
.mat-chip {
flex: 0 0 auto;
background: transparent;
color: var(--white);
}
}
.mat-chip-list {
margin-left: 20px;
}
.mat-chip.mat-standard-chip .mat-chip-remove {
color: var(--white);
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5329 次 |
最近记录: |