我的字体无法兼容所有浏览器。 .ttf
文件适用于所有浏览器,explorer 除外。这是我当前的代码:
@font-face {
font-family: Gotham;
src: url("../Gotham-Book.eot"),
src: url("../Gotham-Book.eot#iefix") format('embedded-opentype');
src: url("../Gotham-Book.ttf") format("truetype");
}
最佳答案
你有太多src:
声明,从而用一个新的覆盖 IE hacks。浏览器只能看到 tff
在你的例子中。
您应该只有两个,第一个是单独的。请注意带有字体的中间行如何具有 ,
而不是 ;
最后还有怎么没有src:
在最后一个 oe 中。
@font-face {
font-family: Gotham;
src: url("../Gotham-Book.eot"),
src: url("../Gotham-Book.eot#iefix") format('embedded-opentype'),
url("../Gotham-Book.ttf") format("truetype");
}
关于html - 如何将 .ttf 和 .eot 文件作为一种字体嵌入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54655467/