-1
我想爲每個對話框設置不同的標題顏色。 我有幾個對話是這樣的:primeface中每個對話框標題的獨特風格
<p:dialog header="dilog name" widgetVar="inputDialog" id="inputDlg"
modal="true" resizable="false" class="topRed"
onHide="PF('inputDialogTabViewWidget').select(0)"> ...
</p:dialog>
而且我有這樣的風格:
.ui-widget-header .topRed {
border: 1px solid #e78f08;
font-family: 'PT Sans Narrow',sans-serif;
background: url(../img/title-bg3.png) repeat-x !important;
font-weight: bold;
}
這是不工作,但是當我重寫BACE風格的一切工作正常。下面的CSS爲所有對話框設置一種風格。
.ui-widget-header {
border: 1px solid #e78f08;
font-family: 'PT Sans Narrow',sans-serif;
background: url(../img/title-bg3.png) repeat-x !important;
font-weight: bold;
}
你確定'的.ui-插件頭.topRed'好?它不應該是'.topRed .ui-widget-header'或類似的東西嗎?使用瀏覽器開發工具進行檢查...容易 – Kukeltje