Bootstrap图标显示正常,但IE11报错CSS3111。

3

在IE11中,Bootstrap glyphicon 显示正常,但控制台报告这些文件的错误:CSS3111:@font-face 遇到未知错误

  • glyphicons-halflings-regular.eot
  • glyphicons-halflings-regular.woff
  • glyphicons-halflings-regular.ttf

enter image description here

以下是我样式表中的 Bootstrap 覆盖(只更改了URL路径):

@font-face {
    font-family: 'Glyphicons Halflings';
    src: url('../../vendor/bootstrap/fonts/glyphicons-halflings-regular.eot');
    src: url('../../vendor/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
        url('../../vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2') format('woff2'), 
        url('../../vendor/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), 
        url('../../vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), 
        url('../../vendor/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

顺便提一下: 如果我在第一个src网址后面添加!important,则图标不会显示出来

@font-face {
    font-family: 'Glyphicons Halflings';
    src: url('../../vendor/bootstrap/fonts/glyphicons-halflings-regular.eot') !important;
...}

使用Bootstrap 3.3.4,IE11

如何消除错误?


我想这可能对你有所帮助...https://dev59.com/WWgu5IYBdhLWcg3wHzoX - Mahabub Islam Prio
2个回答

1

0

我宁愿不修改第三方文件(根据您的回答,这是Bootstrap的.eot文件)。我不想在我的构建过程中添加不必要的步骤。如果有人可以验证这确实是Bootstrap的问题,那么我将在他们的GitHub存储库上提交此问题。 - ruhong
请随时提出问题,在那里我们欢迎你的到来。如果您得到了合适的解决方案,请在此处发布解决方案,这对我们而言真的非常棒。 - Mahabub Islam Prio

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接