我想使用fontawesome对于工具提示文本,但我不知道如何实现它。它与覆盖面板一起使用,但我想使用 <p:tooltip>
标签。
我使用 primefaces 4.0 和 jsf 2.1 这是带有工具提示的代码
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />
<p:graphicImage id="grap" class="fa fa-question-circle fa-2x"/>
<p:tooltip for="grap" value="Some Help" showEffect="fade" />
如果我使用以下内容,它就可以工作
<h:panelGroup id="mail" class="fa fa-question-circle fa-2x" />
<p:overlayPanel for="mail" showEvent="mouseover" hideEvent="mouseout" hideEffect="fade">
<p:panel>
TEXTTEXTTEXT
</p:panel>
</p:overlayPanel>
最佳答案
也许这就是您正在寻找的。它适用于 Primefaces 6.0 和 JSF 2.3.0。
<p:outputLabel id ="idEmptyLabel">
<i class="fa fa-question-circle fa-2x"/>
</p:outputLabel>
<p:tooltip for="idEmptyLabel" value="It works!" />
关于jsf - 带有 Fontawesome 图标的工具提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21831720/