【问题标题】:▾ and ✓ characters not showing up in IE8▾ 和 ✓ 字符未在 IE8 中显示
【发布时间】:2014-04-06 20:36:01
【问题描述】:

我使用的是用户输入的 ▾ 和 ✓ 字符,所以我使用它们的完整 html 值(类似于 ✓)。

这些在 Chrome、FF 和 IE9 中运行良好。但是在 IE8 中,它们被替换为方形字符(见下图)。

【问题讨论】:

  • 您是否在 HTML 代码中指定了字符集?你有 jsfiddle 吗?
  • IE8 建议使用 Windows XP 并且没有包含这些字符的字体。

标签: html internet-explorer-8


【解决方案1】:

当我想在 IE8 上使用 unicode 字符时,我使用

<span class="unicode">unicode characters here</span>

.unicode {
    font-family: 'DejaVu Serif';
}
@font-face {
    font-family: 'DejaVu Serif';
    src: url('fonts/DejaVuSerif.eot');
    src:local('DejaVu Serif'), 
        local('DejaVu Serif Book'), 
        url('fonts/DejaVuSerif.eot?#iefix') format('embedded-opentype'), 
        url('fonts/DejaVuSerif.woff') format('woff'),
        url('fonts/DejaVuSerif.ttf') format('truetype'),
        url('fonts/DejaVuSerif.svg#font') format('svg');
}

其中DejaVu 字体是提供更广泛字符的公共领域字体。您可以下载他们的.ttf字体here,并使用在线工具将它们转换为其他类型。

【讨论】:

    【解决方案2】:

    您可以使用 Wingdings 字体,但 Mozilla 和 Opera 符合标准。 Wingdings 不是标准的(来自 Microsoft 真是令人惊讶),因为没有映射到 Unicode,因此永远不应该在网站上使用。

    但是,不要绝望,大多数符号都可以在 Unicode 中使用:检查

    http://www.alanwood.net/demos/wingdings.html

    您想要的符号是列表中的数字 252。

    【讨论】:

      猜你喜欢
      • 2023-03-17
      • 2013-12-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多