gpt4 book ai didi

angular - Material Angular 6 中的单行水平芯片列表

转载 作者:行者123 更新时间:2023-12-03 22:13:14 29 4
gpt4 key购买 nike

如何在 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);
}

关于angular - Material Angular 6 中的单行水平芯片列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52805504/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com