在IE11中,Bootstrap glyphicon 显示正常,但控制台报告这些文件的错误:CSS3111:@font-face 遇到未知错误
- glyphicons-halflings-regular.eot
- glyphicons-halflings-regular.woff
- glyphicons-halflings-regular.ttf
以下是我样式表中的 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
如何消除错误?