字体令人敬畏的图标未在PhoneGap iOS应用程序中呈现
-
26-12-2019 - |
题
然后渲染我获得小方块的图标:
它在浏览器中完全正常,但是当我在iOS模拟器或移动Safari中查看我的应用时,那里的正方形是。
非常感谢您的帮助!
解决方案
我有同样的问题。我将“字体awesome.min.css”文件直接放在我的Cordova iOS Xcode中,而不是在“index.html”文件中调用它,其中:
<link rel="stylesheet" href="css/font-awesome.min.css">
.
之后,我尝试使用字体Awesome Spinner,而不是默认的jQuery Modile Preloader,即使在jQuery Mobile呼叫之前的“index.html”中也具有此代码:
<script>
$(document).bind( 'mobileinit', function(){
$.mobile.loader.prototype.options.text = "loading";
$.mobile.loader.prototype.options.textVisible = true;
$.mobile.loader.prototype.options.theme = "p";
$.mobile.loader.prototype.options.textonly = false;
$.mobile.loader.prototype.options.html = "<span class='ui-bar ui-overlay-c ui-corner-all'><i class='fa fa-spinner fa-spin fa-5x' style='color:#000;'></i></span>";
});
</script>
.
结果是同一个旋转方形,我错了?
其他提示
首先,安装字体很棒:
下载最新的字体很棒版本 双击FONTAWESOME-WEBFONT.TTF并在笔记本电脑/桌面上安装它(可选) 将fontawesome.css复制到www / css 删除FontaWesome.css中的字体文件的引用,即删除@ Font-Face声明 然后在Xcode中:
将fontawesome-webfont.ttf复制到“您的项目/资源/字体/ fontawesome-webfont.ttf”中 通过选择“信息”选项卡将字体添加到.plist文件 添加名为“由应用程序提供的字体”的新属性并将值设置为“fontawesome-webfont.ttf” 清洁并建立您的项目。Font Awesome现在可以使用。
phonegap示例: class=“fa fa-cog”
不隶属于 StackOverflow