【发布时间】:2018-06-08 23:01:49
【问题描述】:
我希望为单元格添加自定义颜色。
尝试使用
`styles: [`
:host /deep/ ng2-smart-table tbody > tr > td:first-child {
color: red;
}
`]`
但这会改变整个第一列的颜色
【问题讨论】:
标签: ng2-smart-table
我希望为单元格添加自定义颜色。
尝试使用
`styles: [`
:host /deep/ ng2-smart-table tbody > tr > td:first-child {
color: red;
}
`]`
但这会改变整个第一列的颜色
【问题讨论】:
标签: ng2-smart-table
如果您不仅要为第一个单元格着色,还需要将first-child 添加到tr:
:host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
color: red;
}
【讨论】:
ng2-smart-table改成你的班级,例如::host /deep/ .testColor tbody