2012-10-01 44 views
0

如何改變primefaces組件的樣式。 特別是背景顏色<p:layoutUnit如何改變primefaces組件的樣式

這是我的代碼:

<p:layout fullPage="true"> 
     <!-- TITRE --> 
     <p:layoutUnit position="north" size="auto" resizable="true" closable="true" > 
      <ui:include src="titre.xhtml"></ui:include> 
     </p:layoutUnit> 
     <!-- CONTENT --> 
     <p:layoutUnit position="center" size="25%" header="Options" > 
       <ui:include src="titre.xhtml"></ui:include> 
     </ui:include> 
    <p:layout fullPage="true"> 

回答

2

您可以添加:風格= 「背景:紅色重要的」 紅色背景。你也可以推出自己的主題。該過程在primefaces手冊中描述(可在網上免費):

<p:layoutUnit position="north" style="background: red !important;" size="auto" resizable="true" closable="true" > 

如果你需要更多的東西specific-隨意問。

+0

thx for response。我嘗試過這個。但問題只是

+0

哦,我忘記了這一點。您還需要使用樣式:ui-layout-unit div.ui-layout-unit-content來更改顏色。如果你想對整個主題進行設計 - 在文檔中他們會描述如何使用主題滾輪進行設計。鏈接:http://primefaces.googlecode.com/files/primefaces_users_guide_3_4.pdf – bjedrzejewski

+0

你能給我這個文檔的鏈接嗎?謝謝 –