jquery UI图标问题 [英] jquery UI icons issue

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

问题描述


您好,为什么图标会执行br>
本身

Hello, why does the icons do a br> itself

我的意思是:

来源:

.ui-icon-bullet { background-position: -80px -144px; }
    <span class="ui-icon ui-icon-bullet"></span> Hello


推荐答案

如果你看看JQuery UI CSS主题文件,您会注意到

If you take a look at the JQuery UI CSS theme file, you will notice that

.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }

所有带有 ui-icon 将显示为一个块(因此,之前和之后的< br />)。您可以通过向图标元素应用浮动以使其留在文本左侧来更改此行为。

So any element with the class ui-icon will be displayed as a block (therefore a <br /> before and after) You can change this behavior by applying a float left to your icon element to make it left of your text

<span class="ui-icon ui-icon-bullet" style="float:left;"></span> Hello

会执行

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

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