[英]How do I modify the Datatable header style in PF Dynamic Columns?
我正在尝试将CSS规则应用于数据表的标题。
问题是我正在使用动态列( <p:columnS>
),并且我不知道如何仅对标题应用CSS规则。
当我尝试为p:column
设置样式属性时,它也会更改行样式。
<p:columns var="a" width="40" style="text-align:center;color:red" ....>
当我尝试仅在css规则上设置th
时,它不起作用:
<p:columns var="a" width="40" style="text-align:center" styleClass="test" ... >
.test th {
color:red;
}
另外,我不能仅仅制定#table th {...}之类的规则,因为标题样式的规则取决于每个动态列。 就像这样:
<p:columns var="a" width="40" style="text-align:center" styleClass="#{a.style}" ...>
.style1{....}
Suggetions?
我想你可以做
th[role=columnheader] {
background-image: none;
....
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.