本文介绍了带有PrimeFaces的FontAwesome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我渴望将FontAwesome图标包含在Primefaces中,最后擎天柱昨天发布了这个很棒的新功能. -> http://blog.primefaces.org/?p=3004#comment- 5422

I was longing for the inclusion of FontAwesome icons inside Primefaces, and finally Optimus posted yesterday this great new. --> http://blog.primefaces.org/?p=3004#comment-5422

由Max Dicson集成,我们现在应该可以使用它们了.

Integrated by Max Dicson We now should be able to use them.

但是,在教程视频中,我无法解决该问题.

However following at the tutorial video I'm not able to work it out.

  • Using PF4.0 but JSF 2.1 (the only diff from the video)
  • Added the last maven-FontAwesome.jar --> http://mvnrepository.com/artifact/org.webjars/font-awesome/4.0.3
  • Added the mime-types in the web.xml file

使用<h:outputStylesheet name="webjars/font-awesome/4.0.3/css/font-awesome.css">

但是无法获得我想要的fa-bug.

But not being able to get my desired fa-bug.

有什么主意吗?谢谢!

推荐答案

可以用

.ui-icon.fa {
     text-indent:0px;
     background-image:none;
}

这篇关于带有PrimeFaces的FontAwesome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 19:54