在此页面https://material.angular.io/components/select/overview的“禁用选择或单个选项”中,禁用时的mat-select如下所示:
所以我想隐藏该尖的下划线。
我尝试了这里找到的一些解决方案,但是没有一个对我有帮助。
答案 0 :(得分:0)
这不是下划线,是背景图片。试试这个。
.mat-form-field-disabled .mat-form-field-underline {
background-image: unset;
}
将其添加到style.css
中,并检查angular.json
是否在主题文件之前加载了style.css
答案 1 :(得分:-1)
将此CSS代码添加到您的组件中:
<table id="detailTable">
<thead><tr><th>ProductName</th><th>Qty</th><th>Price</th></tr></thead>
<tbody>
</tbody>
</table>