gpt4 book ai didi

css - @font-face 适用于 mac 所有浏览器,但不适用于 windows ff 和 i.e

转载 作者:行者123 更新时间:2023-11-28 13:55:34 25 4
gpt4 key购买 nike

这应该很简单,但就是行不通,我有来自 Font Squirrel 的以下代码:

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

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

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

它适用于所有 mac 浏览器,但不适用于 ff 或 windows 浏览器,chrome 顺便说一下适用于 windows。不确定我哪里出错了尝试将 ' 更改为 "但仍然没有。

谢谢

最佳答案

对于给定的信息非常有限,但如果它在 ff 和 ie 中不起作用,我打赌它在你的标题中:将它添加到你的 .htaccess 文件中:

AddType 应用程序/vnd.ms-fontobject .eot

AddType 字体/ttf .ttf

AddType 字体/otf .otf

header 设置 Access-Control-Allow-Origin "*"

引用:http://www.cssbakery.com/2010/07/fixing-firefox-font-face-cross-domain_25.html

如果您仍然遇到 IE 问题,我敢打赌这是 IIS 问题

关于css - @font-face 适用于 mac 所有浏览器,但不适用于 windows ff 和 i.e,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10854481/

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