gpt4 book ai didi

css - 在 IE 8 及以下版本中渲染字体(适用于所有其他浏览器)

转载 作者:太空宇宙 更新时间:2023-11-04 15:14:55 25 4
gpt4 key购买 nike

我无法让 IE 8 及以下版本(最好是 IE 6)呈现我服务器上的字体。

我使用的代码如下:

@font-face { 
font-family:omnes;
src:url('fonts/Omnes-Regular.eot') format('eot'),
url('fonts/Omnes-Regular.otf') format('otf'),
url('fonts/Omnes-Regular.ttf') format('truetype');
}

这似乎适用于所有其他浏览器,我该如何处理?

你可以在这里看到一个现场演示:

http://trufavarela.com/uruware/

最佳答案

试试这个:

@font-face {
font-family: 'omnes';
src: url('fonts/Omnes-Regular.eot');
src: url('fonts/Omnes-Regular.eot?#iefix') format('embedded-opentype'),
url('fonts/Omnes-Regular.ttf') format('truetype');
}

您可能不需要 otf 文件格式。这段代码可能会起作用,因为当 IE 尝试获取除 eot 格式之外的任何其他格式时,?只是让它认为字符串的其余部分是一个参数,就像在 php 文件中一样。

此外,您可能还应该包括字体的 woff 和 svg 格式。并使用 Font Squirrel ,为您完成所有工作。

关于css - 在 IE 8 及以下版本中渲染字体(适用于所有其他浏览器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15094200/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com