工具提示未显示在fontawesome图标按钮上 [英] Tooltip not displaying on fontawesome icon button

查看:84
本文介绍了工具提示未显示在fontawesome图标按钮上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在a内嵌套了一个字体惊人的图标,但是工具提示没有弹出.

I have a fontawesome icon nested inside a but the tooltip is not popping up.

<i class="fa fa-random" title="some tooltip"></i>

样式:

i.fa {
    display: inline-block;
}

推荐答案

如果使用的工具提示插件使用::before伪元素,则它与fontawesome冲突,因为它也使用pesudo元素显示图标

If you are using a tooltip plugin that uses the ::before pseudo element then it conflicts with fontawesome because it also uses the pesudo element to display the icon.

最好将图标包装在另一个获得工具提示类的标签中:

It is best to wrap your icon inside another tag that gets the tooltip class:

<span class="tooltip" title="hello world"><i class="fa fa-random"></i></span>

这篇关于工具提示未显示在fontawesome图标按钮上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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