我很想设置 ui-panel-content 的样式但没有成功,这是我正在应用的 CSS
.loginPanel.ui-panel-content {
border: 0;
background: red;
padding: 0.5em 1em;
也试过:
.loginPanel.ui-panel, .loginPanel.ui-panel-content {
border: 0;
background: red;
padding: 0.5em 1em;
但这会使整个面板变红
这是我试图定位的输出 HTML:
<div id="j_idt9:loginPanel" class="ui-panel ui-widget ui-widget-content ui-corner-all loginPanel">
<div id="j_idt9:loginPanel_header" class="ui-panel-titlebar ui-widget-header ui-helper-clearfix ui-corner-all">
<span class="ui-panel-title">Login</span>
</div>
<div id="j_idt9:loginPanel_content" class="ui-panel-content ui-widget-content">
<table id="j_idt9:loginPanelGrid" class="ui-panelgrid ui-widget loginPanelGrid" role="grid">
<tbody>
<tr class="ui-widget-content" role="row">
<td role="gridcell">Username</td>
<td role="gridcell">
<input id="j_idt9:username" name="j_idt9:username" type="text" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" role="textbox" aria-disabled="false" aria-readonly="false" aria-multiline="false">
</td>
</tr>
<tr class="ui-widget-content" role="row">
<td role="gridcell">Password</td>
<td role="gridcell">
<input id="j_idt9:password" name="j_idt9:password" type="password" class="ui-inputfield ui-password ui-widget ui-state-default ui-corner-all" role="textbox" aria-disabled="false" aria-readonly="false" aria-multiline="false">
</td>
</tr>
<tr class="ui-widget-content" role="row">
<td role="gridcell">
<button id="j_idt9:j_idt14" name="j_idt9:j_idt14" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" onclick="statusDialog.show();PrimeFaces.ab({source:'j_idt9:j_idt14',update:'j_idt9:growlID',oncomplete:function(xhr,status,args){statusDialog.hide();}});return false;" type="submit" role="button" aria-disabled="false">
<span class="ui-button-text">Submeter</span>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div id="j_idt9:loginPanel_footer" class="ui-panel-footer ui-widget-content">V.1.0</div>
</div>
任何想法如何设置
更新:这里是源
<div class="loginFromContainer">
<h:form>
<p:growl id="growlID">
</p:growl>
<p:panel id="loginPanel" styleClass="loginPanel" header="Login SRB Armazem" footer="V.1.0">
<p:panelGrid id="loginPanelGrid" columns="1" styleClass="loginPanelGrid">
<h:outputText value="Username" />
<p:inputText id="username" value="#{loginController.userName}" />
<h:outputText value="Password" />
<p:password id="password" value="#{loginController.passWord}" />
<p:commandButton value="Submeter" update="growlID" onclick="statusDialog.show()" oncomplete="statusDialog.hide()" actionListener="#{loginController.verifyLogin(event)}" action="#{loginController.decideRedireccionar()}" />
</p:panelGrid>
</p:panel>
</h:form>