css - 自定义字体未显示在网站上

标签 css fonts font-face

所以,我正在尝试使用 Overseer在我的网站上,但它不会显示给没有在他们的电脑上安装该字体的任何人。我使用@font face 和该字体的 5 个不同版本(otf、eot、woff、ttf 和 svg),但它仍然无法加载。有什么办法可以解决这个问题吗?这是@font-face CSS。

@font-face {
font-family: Overseer;
src: url(fonts/overseer.eot);
src: url(fonts/overseer.eot) format('embedded-opentype'), url(fonts/overseer.woff) format('woff'), url(fonts/overseer.ttf) format('truetype'), url(fonts/overseer.svg) format('svg');
font-weight: 400;
font-style: normal;}

最佳答案

试试这个!一些可能有帮助的小改动。

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

它对我有用。使字体正常工作有时会很困难。 如果有效,请接受。

关于css - 自定义字体未显示在网站上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31205905/

相关文章:

html - 如何使非标准字体适用于IE浏览器?

css - 自定义字体有时在 IE8/IE7 中呈现为斜体

jquery - 如何在html5中的标题上添加悬停效果?

css - 如何在源重定向时显示 CSS 背景图像?

javascript - jQuery 单击 div 的边框

css - css 中的属性优先级重要吗?

java - JFrame 文本显示错误

html - 如何在对其他字体使用 font awesome 时仅显示我预定义的 png 图像中的特定图标

css - 是否有一种算法以编程方式将 TTF 字体分类为通用字体系列?

css - IE加载字体时出现404错误