且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用PrimeFaces中的自定义图标?

更新时间:2023-11-26 23:37:10

您需要定义自己的CSS类:

You need to define your own css class:

.img-button-help { background-image: url('../images/help.png') !important; }

,然后在您的p:commandButton中使用此类:

and then use this class in your p:commandButton:

<p:commandButton icon="img-button-help" />