字体真棒Android上的浏览器不工作 [英] Font Awesome does not work on android browser

查看:140
本文介绍了字体真棒Android上的浏览器不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用字体真棒,它被设计为与Twitter Bootsrap使用。

I am using Font Awesome, which was designed for use with Twitter Bootsrap.

而Android(2.1版本)在Galaxy S的浏览器(型号GT-I9000M)手机不显示图标。它显示了他们作为垂直矩形,类似于你所看到的在这里:

The Android (version 2.1) browser on the Galaxy S (Model # GT-I9000M) phone does not display the icons. It shows them as vertical rectangles, similar to what you see here:

有谁知道修复这个问题?

Does anybody know a fix to this problem?

推荐答案

下面是对整个@字体面的板级支持:的http:// caniuse.com/fontface

Here is the across the board support for @font-face: http://caniuse.com/fontface

2.1浏览器根本不支持它,而且它没有正确的支持,直到4.0。 2.2-3部分支持是指使用本地(),这是不支持的。在所有的股票Android浏览器,如果你正试图采购本地字体,或用它来强迫用户下载你的(笑脸黑客)字体将无法工作。

2.1 browser simply doesn't support it, and it's not properly supported until 4.0. 2.2-3 partial support refers to the use of local(), which isn't supported at all. Font will not work at all on the stock Android browser if you are trying to source local fonts or using it to force user to download yours (smiley face hack).

编辑:<一href=\"http://stackoverflow.com/questions/12312323/how-to-know-if-a-font-font-face-has-already-been-loaded/12316349#12316349\">How要知道,如果一个字体(@字体面)已经被加载?你可以使用这个jQuery插件,如果字体 - 真棒加载检测。如果还没有(无论是由于恶劣的字体文件,或由于缺乏通过电话支持),那么你可以添加一个类增加了一个背景图片(图标)到div / SPAN /不管(不能在&LT;我方式&gt; 标签),该图标已被应用到

How to know if a font (@font-face) has already been loaded? You can use this jQuery plugin to detect if Font-Awesome has loaded. If it hasn't (either due to bad font file or due to lack of support by the phone) then you can add a class which adds a background image (of the icon) to the div/span/whatever (can't be the <i> tag) that the icon has been applied to.

你可以在这里看到一个演示。

这篇关于字体真棒Android上的浏览器不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆