css - 角度表头颜色和显示
问题描述
我正在尝试将 Angular mat 表格标题中占位符的颜色更改为白色,但它不起作用。
而且,我想显示全文“Action”而不是“A ...”如何解决这个问题?
HTML 代码:
<th mat-header-cell *matHeaderCellDef>
<mat-select placeholder="Action" (selectionChange)="filter($event)">
<mat-option value="all"> View All </mat-option>
<mat-option value="some"> View some</mat-option>
</mat-select>
</th>
CSS:
th {
color: white;
}
.mat-select-value-text {
color: white !important;
}
.mat-select-panel mat-option.mat-option {
height: unset;
color: white;
}
.mat-option-text.mat-option-text {
white-space: normal;
color: white;
}
解决方案
试试你的CSS
:host /deep/ .mat-select-value-text { }
我也试过了,但是不行
::ng-deep .mat-select-value-text { }
也许这可以帮助你
推荐阅读
- python - 为什么 Kivy apk 在 android 设备上启动 apk 后立即崩溃
- c++ - Codelite 无法识别 ns-3 文件
- css - (又一个)Flexbox 和位置:粘性
- opencv - opencv:Odroid 板上的编译错误
- javascript - .currentTime JS 属性的问题
- sql - 添加多个索引以优化 SQL 中的查询
- graphql - 我可以只授予角色通过 +1 更新列的权限吗?
- c - 使用 strtok 标记 html
- flutter - 颤振错误:未处理的异常:HandshakeException:客户端中的握手错误
- javascript - 如何显示选择下拉菜单取决于先前的选择?