1
我一直在努力这一段时间。我正在使用primefaces 3.5。我有一个带有图标属性的命令按钮。但图像似乎没有显示。我不确定我是否正确地放置了图片网址。我试了几条路。但仍然没有工作。在萤火虫中,我可以看到图标。<p:commandButton>不显示图标图像
我的形象居住在/ BelsizeWeb /的WebContent /主题/ primefaces-ARISTO /图像 CSS驻留在/ BelsizeWeb /的WebContent /主题/ primefaces-ARISTO
theme.css
.ui-icon-excel {
background-image: url("images/toexcel.gif");
}
XHTML
<link type="text/css" rel="stylesheet"
href="#{request.contextPath}/theme/primefaces-aristo/theme.css" />
<p:commandButton type="submit"
styleClass="commandExButton_image" id="cr1001_command_toexcel"
icon="ui-icon-excel"
action="#{pc_Cr1001.doCr1001_command_toexcelAction}" ajax="false">
</p:commandButton>
感谢您的答复。我可以知道!重要的手段是什么?我对此感到困惑。 – hahagal
在这里结帐http://www.w3.org/TR/CSS21/cascade.html#important-rules – Jitesh