浏览器未显示正确的字体 [英] Browser is not displaying the correct font

查看:107
本文介绍了浏览器未显示正确的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的CSS文件中有此代码,但浏览器不显示字体:

I have this code in my CSS file, but the browser doesn't display the font:

@font-face {
    font-family: 'font';
    src: url("fonts/FS_Metal.ttf");
}

.menu_head {
    width: 100%;
    position: relative;
    height: 30px;
    font-family: 'font';
}


推荐答案

p>

this should be crossbrowser

@font-face {
    font-family: 'your_font';
    src: url('../font/your_font.eot');
    src: url('../font/your_font.eot') format('embedded-opentype'),
         url('../font/your_font.woff') format('woff'),
         url('../font/your_font.ttf') format('truetype'),
         url('../font/your_font.svg#your_font') format('svg');
}

.menu_head {font-family:'your_font',serif;}


b $ b

我使用 http://convertfonts.com/ ...它会为所有工作

I am using http://convertfonts.com/ ... it will do all work for you

还会检查您的字体文件的路径是否正确

also check if path to your font files is correct

这篇关于浏览器未显示正确的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆