jqueryui themeroller [英] jqueryui themeroller

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

问题描述

我正在学习jQuery UI中的框架图标.

I'm learning about the Framework Icons in jQuery UI.

<span class="ui-icon ui-icon-circle-minus"></span>

在圆圈内产生一个减号图标.
使用ThemeRoller Firefox书签,我能够将图标的颜色更改为红色(使其看起来像一个删除按钮).

produces an icon of a minus sign inside a circle.
Using the ThemeRoller Firefox Bookmarklet, I was able to change the color of the icon to red (to make it look like a delete button).

问:如何使一个jQueryUI图标变为红色,而另一个变为另一种颜色?

Q: How can I make one jQueryUI icon be red and another one another color?

<span class="ui-icon ui-icon-circle-plus"></span>

我想把这个变成绿色.

推荐答案

使用ui-state-...类使用图标更改元素的状态.您需要设计主题,以使处于不同状态(突出显示,悬停,活动,错误,默认)的项目具有不同的颜色.

Use the ui-state-... classes to change the state of the element with the icon. You'll need to design your theme so that items in different states (highlight,hover,active,error,default) have different colors.

<span class="ui-icon ui-icon-circle-plus ui-state-highlight"></span>

我建议不要以这种方式使用状态(就是为了改变颜色).我会在语义上使用状态,并让图标根据需要呈现,以与状态保持一致.如果我特别需要红色/绿色图标,则可以将这些图标专门生成为图像,然后直接使用它们,而不必尝试设计主题以仅为这些图标获得不同的颜色选择.

I would recommend against using the states this way (just to change colors, that is). I'd use the states semantically and let the icons render as needed to be consistent with the state. If I specifically needed red/green icons, I'd generate those icons specifically as images and simply use them directly instead of trying to design the theme to get different color choices just for those icons.

对于它的价值,我认为 FamFamFam Silk 图标与jQuery UI集成得很好.

For what it's worth, I think the FamFamFam Silk icons integrate pretty well with jQuery UI.

这篇关于jqueryui themeroller的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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