html – @ font-face – 如何使其适用于所有浏览器

The @font-face rule is supported in Internet Explorer 9,Firefox,
Opera,Chrome,and Safari.

However,Internet Explorer 9 only supports .eot type fonts,while
Firefox,Safari,and Opera support .ttf and .otf type fonts.

Note: Internet Explorer 8 and earlier versions,do not support the
@font-face rule.

这个文本来自here.所以为了让IE9的@ font-face工作,我应该只指定EOT字体文件

@font-face
{
font-family: myFirstFont;
src: url('Sansation_Light.ttf'),url('Sansation_Light.eot'); /* IE9 */
}

特别是我使用Myriad Pro,我有OTF字体.我如何将它们转换为EOT类型?

关于IE7和IE8应该使用什么技巧/黑客来获得所需的结果?

解决方法

首先,您没有嵌入大多数字体的版权 – 任何人都可以下载它们,因此将字体放在您的服务器上供别人下载没有什么不同.

我的建议是使用这里找到的字体squirrel工具:http://www.fontsquirrel.com/fontface/generator为你生成文件代码.

小心不要共享您无权使用的字体.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些