有没有办法让IE显示黑色的星号字符(HTML实体& starf或raw★)? [英] Is there a way to get IE to display the black star character (HTML entity ★ or raw ★)?

查看:155
本文介绍了有没有办法让IE显示黑色的星号字符(HTML实体& starf或raw★)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让Windows XP显示黑色的星号字符(HTML实体& starf; 或raw★)?



当我使用HTML doctype和UTF-8在Windows上进行测试时,& starf; 显示为& starf; ,而★显示为正方形。

解决方案

使用UTF- 8个编码数据,或数字字符参考★ ★ 。不要使用& starf; 实体,这是一个提出的HTML5实体,浏览器支持非常有限(去年春天,当我测试,浏览器支持它们;现在有些做)。



您尝试使用字符失败的原因很可能是字体问题。这取决于用户系统,浏览器上的字体和页面上的CSS设置。要最大限度地提高赔率,请使用包含已知具有字符字形的字体的 font-family 声明。欲了解更多信息,请访问 HTML中的特殊字符中的页面。



字体支持BLACK STAR字符相对有限,并且不保证所有计算机都有支持它的字体。但是您可以将该角色包裹在 span 元素中,并设置例如

  font-family:Arial Unicode MS,Quivira,Symbola,Code2000,STIX,
Linux Libertine,MingLiUDFKai-SB;


Is there a way to get Windows XP to display the black star character (HTML entity ★ or raw ★)?

When I test in on windows using HTML doctype and UTF-8, ★ shows as literally as ★ while ★ shows as a square.

解决方案

Use the character as such, in UTF-8 encoded data, or the numeric character reference ★ or ★. Do not use the ★ entity, which is a proposed HTML5 entity with very limited browser support (last spring when I tested, no browser supported them; now some do).

The reason why your attempt with the character as such fails is most probably a font issue. It depends on the fonts available on the user’s system, on the browser, and on the CSS settings on the page. To maximize the odds, use a font-family declaration that contains fonts known to have a glyph for the character. For more info check my page on special characters in HTML.

Font support to the BLACK STAR character is relatively limited, and there is no guarantee that all computers have a font supporting it. But you could wrap the character in a span element and set e.g.

font-family: "Arial Unicode MS", Quivira, Symbola, Code2000, STIX,
  "Linux Libertine", MingLiU, "DFKai-SB"; 

on that element.

这篇关于有没有办法让IE显示黑色的星号字符(HTML实体& starf或raw★)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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