[英]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.