Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ng2 smart table Ng2智能桌单电池样式_Ng2 Smart Table - Fatal编程技术网

Ng2 smart table Ng2智能桌单电池样式

Ng2 smart table Ng2智能桌单电池样式,ng2-smart-table,Ng2 Smart Table,我希望为单元格添加自定义颜色 试用 `styles: [` :host /deep/ ng2-smart-table tbody > tr > td:first-child { color: red; } `]` 但是,如果您想给第一个单元格上色,而不仅仅是给第一列上色,那么这会改变整个第一列的颜色,您还需要将第一个子项添加到tr: :host /deep/ ng2-smart-table tbody > tr:first-child

我希望为单元格添加自定义颜色

试用

`styles: [`    
    :host /deep/ ng2-smart-table tbody > tr > td:first-child {
    color: red;
    }
    `]`

但是,如果您想给第一个单元格上色,而不仅仅是给第一列上色,那么这会改变整个第一列的颜色,您还需要将
第一个子项
添加到
tr

:host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
  color: red;
  }

如果要为第一个单元格着色,而不仅仅是第一列,则还需要将
第一个子项
添加到
tr

:host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
  color: red;
  }

如何将此样式绑定到ngClass?您需要将
ng2智能表
更改为您的类,例如:
:host/deep/.testColor tbody
如何将此样式绑定到ngClass?您需要将
ng2智能表
更改为您的类,例如:
:host/deep/.testColor tbody