我有<p:commandLink>
的问题。我想让悬停效果,但我不能通过CSS加载图像到<p:graphicImage>
。带有图像的JSF commandLink
CSS:
.accountEditBtn {
background-image:
url('#{request.contextPath}/resources/image/pencil_black.png');
}
JSF:
<p:commandLink
update="@form"
actionListener="#{someBean.someListener}">
<h:graphicImage styleClass="accountEditBtn" />
</p:commandLink>
我看到边境空矩形。
但是当我添加Alt键graphicImage的,我得到了像从替代文本...
凡我错了吗? 谢谢。 p.s.打字错误 - classType所 - >的styleClass
刚一说明,但代替'背景图像:网址( '#{} request.contextPath /resources/image/pencil_black.png');'在CSS,你可以写'背景:网址(” #{resource ['image/pencil_black.png']}“);' – 2012-04-19 08:42:14