Tooltip not displaying on fontawesome icon button

强颜欢笑 提交于 2020-01-06 03:48:12

问题


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

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

style:

i.fa {
    display: inline-block;
}

回答1:


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>


来源:https://stackoverflow.com/questions/39089745/tooltip-not-displaying-on-fontawesome-icon-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!