我正在使用primefaces 3.5,我想在完成任何操作后显示对话框窗口。对话框应如下所示
但我不知道为什么我的被覆盖的主题不起作用,我尝试了很多次,我有这样的输出
我覆盖的css是这样的
.ui-widget-content{
background-color:white;
}
.ui-helper-clearfix:after{
background-color:green!important;
}
.ui-widget-header{
background:green!important;
}
.ui-shadow{
box-shadow:none;
}
.ui-dialog-content{
background:white!important;
padding: 0,0,0,0!important;
}
我的xhtml文件代码是这样的:
<h:form id="form6">
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
<h:button id="button1" onclick="ex.show();return false;" value="Ex alternis sermonibus" actionListener="#{indexBean.addInfo}"/>
<h:button id="button2" onclick="radicalis.show();return false;" value="Radicalis alternis sermonibus"/>
<p:commandButton id="infoButton" value="Info" actionListener="#{indexBean.addInfo}"/>
</h:form>
<h:form id="form1">
<h:outputText id="hail"/>
</h:form>
<h:outputText id="hail-outside" />
<p:dialog id="dialog1" header="Success" modal="true" resizable="false" style="height: 121px!important;left: 18px!important;width: 295px!important;" appendToBody="true" widgetVar="ex"
styleClass="ui-widget-content ui-helper-clearfix:after ui-widget-header ui-shadow .ui-dialog .ui-dialog-content">
<h:form id="form2">
<h:outputText value="You have successfully complete the action" ></h:outputText>
<p:commandButton value="ok" >
</p:commandButton>
</h:form>
</p:dialog>
<p:dialog id="dialog2" appendToBody="true" modal="true" widgetVar="radicalis">
<h:form id="form3">
<h:outputText value="Welcome here every one"></h:outputText>
</h:form>
</p:dialog>
请告诉我我的css出了什么问题
发布于 2018-07-12 04:26:55
在我的例子中,css是不同的,因为我想改变边框的颜色
<p:dialog id="dialog1" header="Success" modal="true" resizable="false" appendToBody="true" widgetVar="ex" width="295" height="181"
styleClass="customDialog">
CSS
.customDialog {
color : white;
}
.customDialog .ui-dialog-titlebar.ui-widget-header {
background: green !important;
}
https://stackoverflow.com/questions/22033722
复制相似问题