IE 中的 HTML 实体和字符集
我正在使用 iso-8859-1 作为字符集的 html 文档中显示 html 实体 ✓
(复选标记:✓)。
在 Firefox 中,它显示为复选标记。 在 IE 中,它显示为一个方框。 切换到 UTF-8 似乎没有什么区别。
有没有可靠的方法在 IE 6 和 IE 中显示这些实体? 7 不使用图像?
I am displaying html entity ✓
(a check mark: ✓) in an html document that uses iso-8859-1 for the character set.
In Firefox, it displays as a check mark. In IE, it displays as a square box. Switching to UTF-8 doesn't seem to make a difference.
Is there a reliable way to display these entities in IE 6 & 7 without using images?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
方形意味着使用的字体没有该字符的字形。
不幸的是,包含该字符的字体并不多,而且默认情况下,所有 Windows 计算机上都不存在这些字体(非 Windows 计算机上的字体更少)
最有可能存在的字体(包含该字形)是 Arial Unicode MS (Officie 附带)和 MS Gothic + family(日语字体)。
请参阅此处,了解可以帮助您确定字体包含哪些字形的工具:http:// /www.mihai-nita.net/article.php?artID=charmapex
但是,如果您想要一个可靠工作的解决方案,那么图像是您最安全的选择。
Square means that the font used does not have the glyph for that character.
Unfortunately, there are not many fonts containing that character, and none of them is present by default on all Windows machines (and even less on non-Windows ones)
The most likely fonts to be present (that contain that glyph) are Arial Unicode MS (comes with Officie), and MS Gothic + family (which is a Japanese font).
See here for a tool that can help you determine that font contains what glyphs: http://www.mihai-nita.net/article.php?artID=charmapex
But if you want a solution that works reliably, an image is your safest bet.
也许 Internet Explorer 使用的字体没有显示该字符的字形。
Perhaps the typeface used by Internet Explorer doesn’t have a glyph to display this character.
您可能想要使用
字体系列:Arial Unicode MS、Arial、Sans-Serif
。 IE 无法正确显示 Arial 中的 unicode 字符...You probably want to use
font-family: Arial Unicode MS, Arial, Sans-Serif
. IE does not display properly unicode chars from Arial...您可以尝试平方根符号“√”,它看起来不太完美,但还可以。 √
You can try the square root symbol, "√", which doesn't look perfect but ok. √
如果是 IE,您可以合理地假设它在 Windows 上,因此,有 WingDings 字体可用... MS WingDings 中的字母 ü 是一个简单的复选标记(类似于 ✓),þ 是一个框中的复选标记(类似于☑)。
If it's IE, you can reasonably assume it's on Windows, and hence, there's a WingDings font available... The letter ü in MS WingDings is a simple checkmark (similar to ✓), and þ is a checkmark in a box (similar to ☑).
我在样式标签中指定了字体属性,并且复选标记在 IE7 中正确显示,这是我的大多数客户正在使用的。 例子:
✓ Some text
I specified the font attributes in a style tag and the checkmark is displayed properly in IE7 which is what the majority of my clients are using. Example:
✓ Some text
根据 http://www.w3.org,复选标记不是 8859-1 的一部分:< a href="http://www.w3.org/TR/html401/sgml/entities.html" rel="nofollow noreferrer">http://www.w3.org/TR/html401/sgml/entities.html
它是 UTF-8 格式的 e29c93。
Per http://www.w3.org, the check mark isn't part of 8859-1: http://www.w3.org/TR/html401/sgml/entities.html
It's e29c93 in UTF-8.