css - CSS3111:@font-face 遇到未知错误“在启用不受信任的字体阻止时,在 IE11 中由 icomoon 应用程序创建的图标抛出
问题描述
我通过 icomoon 创建了字体图标。并使用以下代码在网页的 CSS 中添加字体:
@font-face {
font-family: 'xlfont';
src: url('./images/spreadsheet/xlicons.eot?-dzszjm');
src: url('./images/spreadsheet/xlicons.eot?#iefix-dzszjm') format('embedded-opentype'),
url('./images/spreadsheet/xlicons.woff?-dzszjm') format('woff'),
url('./images/spreadsheet/xlicons.woff') format('woff'),
url('./images/spreadsheet/xlicons.ttf?-dzszjm') format('truetype'),
url('./images/spreadsheet/xlicons.svg?-dzszjm#ssicons') format('svg');
font-weight: normal;
font-style: normal;
}
这在 IE11 中运行良好,直到我启用选项“<a href="https://support.microsoft.com/en-us/help/3053676/windows-10-technical-preview-adds-a-feature-that -blocks-untrusted-font" rel="nofollow noreferrer">不受信任的字体阻止”。启用此选项后,我收到以下错误。
CSS3111: @font-face encountered unknown error.
xlicons.eot
其他人有这样的问题吗?您能否提供任何建议以解决此问题?
解决方案
尝试注释掉embedded-opentype
声明行。如果这不起作用,请从堆栈上的另一个答案中考虑以下内容:
CSS3111 通常是由字体的二进制源问题引起的。例如,流行的在线 TTF 到 EOT 转换器之一生成带有不符合 Microsoft 标准的 NAME 表的 EOT 文件,这导致 EOT 字体永远不会在 IE 中加载并产生 CSS3111 错误。因此,当您体验 CSS3111 时,尝试使用不同的 TTF 到 EOT 转换器或字体生成器总是好的。
推荐阅读
- odoo - 具有变体数据类型的 Odoo 列表视图
- reactjs - 减少 Heroku 中的空闲超时
- javascript - 反应状态变量 - >未定义与假
- ansible - 使用 Ansible 从标准输出中提取值
- python - 如何在没有批量大小轴的情况下使用 tf.pad?
- ruby-on-rails - slug 唯一性和 url
- ruby-on-rails - 在其他控制器的页面中嵌入设计新会话表单
- php - Trying to get property 'join_id' of non-object
- java - 如何在 oracle db- 上注册的 java 程序中设置波兰语 sings 字符集
- c++ - 挥发物是多余的还是不是?