我想找到可以为IE版本6到10渲染字体的代码。我测试了font squirrel,adobe webfonts和谷歌的字体CSS的代码,但没有代码适用于所有IE浏览器。字体为所有IE浏览器版本(6至10)
有没有人有这样的代码?
我想找到可以为IE版本6到10渲染字体的代码。我测试了font squirrel,adobe webfonts和谷歌的字体CSS的代码,但没有代码适用于所有IE浏览器。字体为所有IE浏览器版本(6至10)
有没有人有这样的代码?
我相信这两种服务都会自动为所有支持的浏览器(包括IE)提供代码。
例如,使用样式标记从谷歌字体API中调用字体,实际上会从Google获取具有不同字体声明的CSS文件。
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Karla:400,400italic,700,700italic" />
生成以下CSS:
@font-face {
font-family: 'Karla';
font-style: normal;
font-weight: 400;
src: local('Karla'), local('Karla-Regular'), url(http://themes.googleusercontent.com/static/fonts/karla/v2/QT0qO2FiFD03cwUe_t62t6CWcynf_cDxXwCLxiixG1c.woff) format('woff');
}
@font-face {
font-family: 'Karla';
font-style: normal;
font-weight: 700;
src: local('Karla Bold'), local('Karla-Bold'), url(http://themes.googleusercontent.com/static/fonts/karla/v2/3nZS3BKzlvhkwl4yjCQcjHYhjbSpvc47ee6xR_80Hnw.woff) format('woff');
}
@font-face {
font-family: 'Karla';
font-style: italic;
font-weight: 400;
src: local('Karla Italic'), local('Karla-Italic'), url(http://themes.googleusercontent.com/static/fonts/karla/v2/ietJ6bjhwzrJL8NSJOc2mgLUuEpTyoUstqEm5AMlJo4.woff) format('woff');
}
@font-face {
font-family: 'Karla';
font-style: italic;
font-weight: 700;
src: local('Karla Bold Italic'), local('Karla-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/karla/v2/VZ08RdiotRdV1D0ewK-mxL3hpw3pgy2gAi-Ip7WPMi0.woff) format('woff');
}
正如你所看到的,有不同的格式,不同的浏览器。 WOFF是针对IE的。 Mikey。
Mikey。
PS - 这是我在下面的评论中提到:
你的工作,并在IE中查看本地的?如果是这样,它可能无法正常工作。为了在IE中工作,我认为你必须在实际的服务器上查看网站。与IE中的'标题'和源策略有关 - 这是一个安全的事情。这可能吗?
所有IE版本,真的吗?从版本1开始?什么是实际问题和哪个IE版本? – JJJ 2013-03-11 14:26:51
Google网页字体有什么问题?它支持IE 6+ https://developers.google.com/webfonts/faq#Browsers_Supported – 2013-03-11 14:27:18
这个问题有一个IE字体修复的答案,但也包含你正在寻找的语法:http:// stackoverflow。 com/questions/4607560/font-face-works-in-ie8-but-not-ie9 – 2013-03-11 14:28:24