我希望向单元格添加自定义颜色。
尝试使用
`styles: [`
:host /deep/ ng2-smart-table tbody > tr > td:first-child {
color: red;
}
`]`
但这会改变整个第一列的颜色
最佳答案
如果您想为第一个单元格着色,而不仅仅是第一列,您还需要将 first-child
添加到 tr
中:
:host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
color: red;
}
关于NG2-智能表单细胞造型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48006765/