【发布时间】:2012-10-30 14:41:22
【问题描述】:
我已经尝试了此处和其他地方提供的所有其他解决方案,但在 ie9 中加载 webfonts 时仍然遇到问题。
对 .htaccess 文件实施了修复:
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
在 ie 开发者控制台中没有收到任何 css3 错误消息。
事情是当初始页面加载时,字体不会加载,但是当我导航到网站上的任何其他页面时,字体就会加载。如果我回到初始页面,字体现在也会加载。
感觉就像我已经尝试了我在网络上能找到的所有东西。
这是我的 CSS:
/** FONTS **/
@font-face {
font-family: 'UniversUltraCondensedRegular';
src: url('../fonts/univers-ultracondensed-webfont.eot'); /* IE9 Compat Modes */
src: url('../fonts/univers-ultracondensed-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/univers-ultracondensed-webfont.woff') format('woff'), /* Modern Browsers */
url('../fonts/univers-ultracondensed-webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/univers-ultracondensed-webfont.svg#UniversUltraCondensedRegular') format('svg'); /* Legacy iOS */
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'WebSymbolsRegular';
src: url('../fonts/websymbols-regular-webfont.eot'); /* IE9 Compat Modes */
src: url('../fonts/websymbols-regular-webfont.eot?#iefix') format('embedded- opentype'), /* IE6-IE8 */
url('../fonts/websymbols-regular-webfont.woff') format('woff'), /* Modern Browsers */
url('../fonts/websymbols-regular-webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg'); /* Legacy iOS */
font-weight: normal;
font-style: normal;
}
Here's该网站的链接!
谢谢
【问题讨论】:
-
Header set Access-Control-Allow-Origin "*"存在安全问题。确保在使用之前了解风险。
标签: css fonts internet-explorer-9 font-face webfonts