如何减少透明度堆栈组件标签的宽度
https://vmware.github.io/clarity/documentation/stack-view
我已向选择器添加了以下自定义样式,但没有成功
添加样式:
.myStyle {
max-width: 10% !important;
flex-basis: 10% !important;
}
最佳答案
请引用此Plnkr:https://plnkr.co/edit/gUm8yInQN9DSbO6K8nCE?p=preview (查看app.component.css
文件)
::ng-deep .stack-view .stack-block-label {
flex: 0 0 20%;
}
您需要使用 ::ng-deep
组合器,否则样式将不会应用于组件内。 Angular 文档中提到了这一点:https://angular.io/guide/component-styles (搜索 ::ng-deep
)
关于css - 如何减少透明度堆栈组件标签的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46169948/