PrimeFaces 图标 [英] PrimeFaces icons

查看:19
本文介绍了PrimeFaces 图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到像 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆