How/where to install font Awesome in jquery mobile app

拈花ヽ惹草 提交于 2019-12-07 01:57:21

I've tested this on both Font Awesome 4 and earlier versions. My answer below is based on version 4.

So what you need to do is copy your icon classes from the Font Awesome style sheet and add them to your own style sheet. Then just add ui-icon- in front of the class name. You must also do this to the class where the font-family is created.

For example if you have data-icon="fa fa-cog"

The font-family class is .fa and this will become .ui-icon-fa

.ui-icon-fa {}

And the actual icon css .fa-cog will become .ui-icon-fa-cog

.ui-icon-fa-cog:before {
 content: "\f013";
}

Hope this makes sense.

Does the Font Awesome website examples work in these browsers?

Make sure your HTML doctype is HTML5: <!DOCTYPE html>

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