gpt4 book ai didi

css - .eot 字体是否通过 IE8 上的@font-face datauri 支持?

转载 作者:行者123 更新时间:2023-12-02 05:02:21 24 4
gpt4 key购买 nike

IE8 上的 @font-face datauri 是否支持 .eot 字体?
IE8 上的数据是否仅支持图像?

我知道 32KB 的限制。我的 .eot 字体的 base64 表示没有超过这个限制。

我的 css 声明是这样的:

@font-face {
font-family: 'MyFont';
src: url(data:font/opentype;base64,B1QAAB9TAAACAAI.....);
font-weight: normal;
font-style: normal;
}

最佳答案

数据 URI 应该不是这个问题...

...它应该可以工作,我的 .eot 网络字体可以通过使用它在所有浏览器(甚至 IE7)中工作...但我也使用 WOFF/TTF/SVG 来支持其他浏览器

@font-face {font-family: 'AllyourBase';
src: url('/fonts/allyourbase.eot');
src: url('/fonts/allyourbase.eot?#iefix') format('embedded-opentype'),
url('/fonts/allyourbase.woff') format('woff'),
url('/fonts/allyourbase.ttf') format('truetype'),
url('/fonts/allyourbase.svg?#allyourbase') format('svg');
font-weight: normal;
font-style: normal;
}

确保 IIS 在您的本地/Web 服务器上具有正确的 MIME 类型(例如:application/vnd.ms-fontobject for .eot 文件)。

最后....我怀疑 Datauri 是原因,但为了安全起见,请尝试不使用 data/base64,看看它是否有任何作用

关于css - .eot 字体是否通过 IE8 上的@font-face datauri 支持?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15162675/

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