How can I use Font Awesome (or other font icons) instead of the jQuery sprites in Primefaces DataTable?

后端 未结 2 993
梦如初夏
梦如初夏 2020-12-30 14:46

I\'m using PrimeFaces to generate a datatable. The default sorting icons are chevrons from the JQuery library but as they are not Vector they look ugly. I wan\'t to replace

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 14:58

    here is an example:

    .ui-paginator-first.ui-state-default.ui-corner-all:before{
        content: "\f049";
        font-family: FontAwesome;
        color: white;
    }
    

    you can find the codes you cann add for content instead of "\f049" in the font-awesome website http://fortawesome.github.io/Font-Awesome/icon/pencil/

    the :before is important behind the css class

提交回复
热议问题