在 jQuery-UI 中调整图标大小 [英] Resizing Icons in jQuery-UI

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

问题描述

我发现 jquery UI 中的图标对于我的应用程序来说有点小.调整 .ui-icon 上的大小当然无济于事,因为图像是从单个图像文件加载的,因此它只会显示其他图标的一部分.

I find the icons in jquery UI to be a bit small for my application. Adjusting the sizes on .ui-icon doesn't help of course, because the images are loaded from a single image file and so it will just show portions of other icons.

有没有什么方法可以调整图标大小,而不必为我想要使用的每种大小调整图标图像文件的大小?

Is there any way to adjust the icon sizes without having to resize the icon image files for each size I'd like to use?

推荐答案

没有.因为图标被打包到一个 CSS sprite 网格中,如果你试图让图标本身变大(如你所见),你只会看到它周围的图标.您可以通过调整边距来增加图标的大小" - 但这不会使图形变大 - 只是它占用的空间.

No. Because the icons are packed into a CSS sprite grid, you will only see the icons around it if you try to make the icon itself bigger (as you saw). You could increase the "size" of the icon by adjusting margin - but this won't make the graphic bigger - just the space it takes up.

编辑 - 看起来 jQuery UI 团队之前已经听说过这个投诉,并且将要在下一版 jQuery UI 中推出一些更大的图标.

Edit - Looks like the jQuery UI team has heard this complaint before and is going to roll out some larger icons in the next release of jQuery UI.

这篇关于在 jQuery-UI 中调整图标大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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