primeNG - implement css style to dataTable

南笙酒味 提交于 2019-12-12 03:43:39

问题


I want to change the colors of the DataTable but I cant implement my custom css to it. Please help me understand how to do it. I ve read the documentation at PrimeNG website.

I did change the thead style using :

.ui-datatable .ui-datatable-thead > tr > th {background: red;}

but i want to know how to use [styleClass] to implement my custom colors to it.


回答1:


Mark !important tag to your custom styles. May be it will works for you.

.ui-datatable .ui-datatable-thead > tr > th {
   background: red !important;
}



回答2:


You can use the below css

.ui-state-default.ui-unselectable-text {
    background-color: red !important;
}


来源:https://stackoverflow.com/questions/44842986/primeng-implement-css-style-to-datatable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!