@font-face问题
我在我正在处理的网站上加载自定义字体时遇到一些问题。
似乎可以在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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
什么是
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.