Twitter Bootstrap icons and Opera Mobile :(

…衆ロ難τιáo~ 提交于 2019-12-12 04:39:45

问题


Why icons of Twitter Bootstrap don't displays in Opera Mobile browsers? How to solve the problem?


回答1:


Opera Mini doesn't support Web fonts in the first place:

Can I use @font-face Web fonts?:

Version | Opera Mini
-------------------------------------------
Current | 5.0-7.0 [Not Supported (= Red)]




回答2:


The HTML file could have a different char set defined. You could try to view it with a different encoding, such as UTF-8.

If the charset is UTF-8 the undisplayed character could be from some other encoding that UTF-8 does not support.




回答3:


its possible your using a CDN (content delivery network) to link to your bootstrap css file...and if you are, then maybe your using an old out of date one. Check to be sure your link is current. One of the advantages of not using a hosted dependency is not having that problem n the future.

currently, try this -> //netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css

according to your comment about the code you are using, your not using bootstrap icons, your uing font awesome icons...add this to your code

<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">

<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">

that should do it

Source - http://fortawesome.github.io/Font-Awesome/3.2.1/icon/globe/

and also source for implementation instructions

http://fortawesome.github.io/Font-Awesome/3.2.1/get-started/




回答4:


The device you are testing with might not have that icon available in its built-in character set. Each device has a font set which it can draw, if you use a character outside that range, it shows some default icon like a square or question mark upside down.

There's not much you can do about the fact that a device doesn't support extended characters in the UTF8 encoding.
You could use a supported character instead, or an image rather. There might be something in the device's accept headers that will give away that it doesn't have all the characters. Otherwise, you have to build up a list of devices by user-agent that has or doesn't have the characters you need and give the appropriate output where applicable.

One library that might help with this is the WURFL device database has a capability called xhtml_preferred_charset which is a string that says if

UTF-8 should be supported by default, but some devices have problems. Here you may find alternative charsets such as iso8859. This field does not present the exact charset because with ISO charsets you may need to specify the one of your region (1, 15, other)

See http://wurfl.sourceforge.net/help_doc.php



来源:https://stackoverflow.com/questions/21773473/twitter-bootstrap-icons-and-opera-mobile

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