我有一个p:commandLink在xhtml页
<p:commandLink onclick="routeDeleteConfirmation.show()" title="Delete">
<h:graphicImage class="deleteBinButtonLnk" />
<f:setPropertyActionListener value="#{route}"
target="#{routeController.selectedRouteHeader}"/>
</p:commandLink>
Css: .deleteBinButtonLnk { width: 17px; height: 19px;
border-style: none !important;
padding: 2px 2px;
background: url('../images/buttons/delete_bin_off.png')
no-repeat;
}
.deleteBinButtonLnk:hover{ width: 17px; height: 19px;
border: none;
background: url('../images/buttons/delete_bin_on.png')
no-repeat;
显示h:graphicImage中图像的边框。我不需要边框
请给出解决方案
我明白了。
styleClass代替<h:graphicImage>
<p:commandLink
styleClass="accountEditBtn"
update="@form"
actionListener="#{someBean.someListener}"
</p:commandLink>
Css类.accountEditBtn { background-image: url('../resources/image/pencil_black.png'); }