造型Primeng DataTable Grid的行选择的最佳方法是什么?我有一个复选框,当选择时,该行更改为bootstrap蓝色。我想减轻选择的颜色。
我该怎么做?
我不确定您是否在任何地方都找到答案,但是您正在寻找的CSS是:
body .ui-datatable .ui-datatable-data tr.ui-datatable-even.ui-state-highlight {
/*background-color handles the color of the highlighted row*/
/*color sets the color of the text*/
background-color: #0275d8;
color: #ffffff;
border-color: #0267bf;}
和:
body .ui-datatable .ui-datatable-data tr.ui-datatable-odd.ui-state-highlight {
background-color: #0275d8;
color: #ffffff;
border-color: #0267bf;}
只需将其粘贴到您自己的CSS文件中,您就可以更改突出显示的颜色,边框颜色和文本颜色。我不确定这是否是最好的方法,但是我上周这样做了,这就是我的工作方式。