【发布时间】:2015-08-17 07:50:12
【问题描述】:
我一直在尝试修复 IE9 上的字体图标。我已经尝试了谷歌结果给出的所有解决方案,但仍然没有运气!。
这是我的 CSS,
@font-face {
font-family: 'my-icons';
src: url("icons.eot");
src: url("icons.eot?#iefix") format("embedded-opentype"), url("icons.woff") format("woff"), url("icons.ttf") format("truetype"), url("icons.svg#icons") format("svg");
font-weight: normal;
font-style: normal;
}
[data-icon]:before {
font-family: "my-icons" !important;
content: attr(data-icon);
font-style: normal !important;
font-weight: normal !important;
font-variant: normal !important;
text-transform: none !important;
speak: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
[class^="my-icon-"]:before,
[class*=" my-icon-"]:before {
font-family: "my-icons" !important;
font-style: normal !important;
font-weight: normal !important;
font-variant: normal !important;
text-transform: none !important;
speak: none;
line-height: 1;
cursor: pointer;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.my-icon-close:before {
content: "\e661";
}
浏览器未处于兼容模式。而且我在控制台中没有发现任何错误 404 或跨源请求。 我还在同一个浏览器上尝试了很棒的字体,它不起作用。这是JSFiddle。
我浪费了很多时间,请帮忙。
谢谢
【问题讨论】:
-
呃... 适用于所有版本的 IE 9、IE 10、IE 11。
-
IE9,版本 9.0.8112.16421;操作系统,Windows 2008 服务器 32 位。那应该和平台有关吧!?
-
您到底遇到了什么错误? IE9中的图标是否可见?
-
没有错误,字体不可见。只有空格代替字体。也没有正方形。
标签: html css font-awesome