gpt4 book ai didi

html - 在 IE 11 上使用字体 : it takes some tries to set the font

转载 作者:行者123 更新时间:2023-11-28 10:33:40 25 4
gpt4 key购买 nike

我有这个网站:

www.sorialconstrucciones.com

我对某些标题和段落使用 font-face,但是当我在 IE 11 上加载页面时,它使用 Times new roman types 显示文本,并且font-face 类型,然后是 Times new roman,最后将字体设置为 font-face 类型。 所有这一切都在不到一秒钟内完成

有什么帮助吗?

编辑:正如我帖子的第一位评论者告诉我的那样,我创建了一个最小化的演示 here ,但问题仍然存在(字体样式在 IE 11 上闪烁)。这是代码:

<html>
<head>
<style type="text/css">
@font-face {
font-family: MontserratBold;
src: url(MontserratBold.ttf);
}
</style>
</head>
<body style="background: red">
<p style="font-family: 'MontserratBold'">jkflasdfas faks faksfj </p>
</body>
</html>

最佳答案

编辑您的字体文件,为 Fontname、Family name 和 Name 定义相同的名称并导出您的 TTF。您可以使用 FontForge申请。

然后再次将其转换为网络(EOT、WOFF)。

Read

通过下载 TTF 字体版本并将其转换为 web 使其工作。

CSS

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

关于html - 在 IE 11 上使用字体 : it takes some tries to set the font,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23426435/

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