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