PrimeFaces图标 [英] PrimeFaces icons
问题描述
我找不到像PickList
组件中的箭头那样拾取箭头icons
的方法,以便在其他CommandButtons
中使用它们.
I cannot find a way to pick the arrow icons
like the ones present in the PickList
component, in order to use them in other CommandButtons
.
好吧,我知道为了在CommandButton中使用图标,必须遵循以下说明:
Well, I know that in order to use an icon in CommandButton, one has to follow these instructions:
<p:commandButton outcome="target" icon="star" title="With Icon"/>
已在css文件中定义了星形图标:
having defined the star icon in a css file:
.star {
background-image: url("images/star.png");
}
但我希望使用与PickList组件完全相同的箭头.
but I would prefer to use exactly the same arrows as for the PickList component.
推荐答案
Primefaces使用 jQuery themeroller 来设置UI样式. Primefaces中所有使用的图标都来自此.只需弹出您喜欢的鼠标悬停图标(在themeroller中),然后弹出.ui-icon-arrow-1-e
之类的图标.然后像这样使用它:
Primefaces use jQuery themeroller for styling UI. All of the used icons in Primefaces are from there. Just mouseover icon you like (in themeroller) and something like : .ui-icon-arrow-1-e
will pop. Then use it like this:
<p:commandButton action="target" icon="ui-icon ui-icon-arrow-1-e" value="Arrow icon"/>
这篇关于PrimeFaces图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!