如何防止Bootstrap的glyphicon渲染到表情符号(Opera,FF)?

时间:2015-06-02 12:49:00

标签: twitter-bootstrap-3 opera mozilla emoji glyphicons

我想知道如何防止在bootstrap的glyphicons中显示表情符号?

<span class="glyphicon glyphicon-tent"></span>

渲染到这个(opera,moz)

enter image description here

我偶然发现了这个: https://apple.stackexchange.com/questions/41228/why-do-emoji-like-appear-when-i-use-safari-but-not-chrome

Unicode:

http://www.fileformat.info/info/unicode/char/26fa/index.htm

解决方案:将您的Bootstrap更新到最新版本。

2 个答案:

答案 0 :(得分:0)

避免此类问题的更好选择是使用font-awesome而不是twitter bootstrap glyphicons,作为奖励,您可以获得比glyphicons提供的更多图标集。但是如果您仍然想使用bootstrap glyphicons,最好复制该glyphicons的unicode(因为glyphicons在内部使用unicode)并附加this answer中给出的代码。

答案 1 :(得分:0)

使用像我<i class="glyphicon glyphicon-tent"></i>这样的跨栏标签可能会有帮助

相关问题