然后渲染图标我得到小方 block :
它在浏览器中运行良好,但当我在 iOS 模拟器或 Mobile Safari 中查看我的应用程序时,方 block 就在那里。
非常感谢您的帮助!
最佳答案
我遇到了同样的问题。我将“font-awesome.min.css”文件直接放在我的 cordova ios xcode 中,然后在“index.html”文件中调用它,其中:
<link rel="stylesheet" href="css/font-awesome.min.css">
在那之后我尝试使用 Font Awesome 微调器而不是默认的 jQuery Modile 预加载器,在 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>
结果和旋转正方形一样,我哪里错了?
关于javascript - Font Awesome 图标未在 Phonegap iOS 应用程序中呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25071105/