@font-face问题

发布于 2024-09-16 00:18:09 字数 992 浏览 4 评论 0原文

我在我正在处理的网站上加载自定义字体时遇到一些问题。

似乎可以在 Chrome 中使用,但就是这样...

https://andstones.site-ym.com/

我附加了一个自定义样式表,

<link charset="utf-8" type="text/css" href="http://www.korymathewson.com/fonts/styles.css" rel="stylesheet">

并在样式表中写下:

@font-face {
    font-family: ChunkFiveRegular;
    src: url('Chunkfive-webfont.eot');
    src: local('☺'), url('Chunkfive-webfont.woff') format('woff'), url('Chunkfive-webfont.ttf') format('truetype'), url('Chunkfive-webfont.svg#webfontb5K2fJwj') format('svg');
    font-weight: normal;
    font-style: normal;
}

然后我将其称为字体系列..

h1.fontface {
    font: 60px/68px 'ChunkFiveRegular', Arial, sans-serif;
    letter-spacing: 0;
}

p.style1, #MainMenu {
    font: 18px/27px 'ChunkFiveRegular', Arial, sans-serif !important;
} 

但它仍然没有显示在 Firefox 或 IE 中...您可以提供任何帮助或建议吗?

I am having some issues with loading a custom font on a site that I am working on.

Seems to work in Chrome, but that is it...

https://andstones.site-ym.com/

I attach a custom stylesheet,

<link charset="utf-8" type="text/css" href="http://www.korymathewson.com/fonts/styles.css" rel="stylesheet">

and in the stylesheet I write:

@font-face {
    font-family: ChunkFiveRegular;
    src: url('Chunkfive-webfont.eot');
    src: local('☺'), url('Chunkfive-webfont.woff') format('woff'), url('Chunkfive-webfont.ttf') format('truetype'), url('Chunkfive-webfont.svg#webfontb5K2fJwj') format('svg');
    font-weight: normal;
    font-style: normal;
}

Then I call that as a font-family..

h1.fontface {
    font: 60px/68px 'ChunkFiveRegular', Arial, sans-serif;
    letter-spacing: 0;
}

p.style1, #MainMenu {
    font: 18px/27px 'ChunkFiveRegular', Arial, sans-serif !important;
} 

But it still does not show up in firefox or IE ... any help or advice you can lend?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寻找我们的幸福 2024-09-23 00:18:09

Firefox 仅允许与请求站点位于同一域的嵌入字体。这里有一个(某种)解决方法:

http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing< /a>

您可能想尝试使用 http://www.fontsquirrel.com/ 来允许您将字体本身嵌入到 CSS 中——非常有用!

希望这有帮助

Firefox only allows embedded fonts that are on the SAME DOMAIN as the site requesting it. There is a (sort of) workaround here:

http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing

You might want to try to use http://www.fontsquirrel.com/ to allow you to have the fonts themselves embedded in the CSS -- very useful!

Hope this helps

浪漫之都 2024-09-23 00:18:09

什么是 92p?一个节点还是一个类? CSS 类/ID 名称不能以数字开头。

What is 92p? A node or is it meant to be a class? CSS class/id names can't start with a number.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文