FONT-FAMILY不活的服务器上正常工作 [英] Font-family not working properly on live server

查看:117
本文介绍了FONT-FAMILY不活的服务器上正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的 FONT-FAMILY安吉丽娜。其本地服务器上正常工作。但它不工作现场的服务器上。它还工作现场的服务器上仅仅只有我的电脑上。但它不工作的任何其他计算机上。
我检查它在其他计算机上,但它不工作的所有浏览器。
我使用的CSS code这样的

  @字体面{
FONT-FAMILY:MyCustomFont;
SRC:URL(ANGELINA.eot)为IE / * EOT文件* /
}
@字体面{
 FONT-FAMILY:MyCustomFont;
 SRC:URL(ANGELINA.TTF)/ *对CSS3的浏览器TTF文件* /
}
.test_font {
    FONT-FAMILY:安吉丽娜;
    字体大小:36px;
    字体重量:大胆的;
}


解决方案

您需要有各种字体的扩展服务器来支持所有浏览器。

@字体面{
    FONT-FAMILY:MyCustomFont;

  SRC:URL('ANGELINA.eot');
SRC:URL('?ANGELINA.eot')格式('和;#9786;'),
     URL('ANGELINA.woff')格式(WOFF),
     URL('ANGELINA.ttf')格式(TrueType字体),
     URL('#ANGELINA.svg webfontssbCkuz5')格式('SVG');

}

您可以找到在这个网站 http://www.google.com/webfonts 所有字体扩展

I am using font-family "angelina". Its working properly on local server. But its not working on live server. It also working on live server just only on my computer. But its not working on any other computers. I check it in all browsers on other computers but its not working. I am using CSS code like this

@font-face {
font-family: MyCustomFont;
src: url("ANGELINA.eot") /* EOT file for IE */
}
@font-face {
 font-family: MyCustomFont;
 src: url("ANGELINA.TTF") /* TTF file for CSS3 browsers */
}
.test_font{
    font-family: angelina;
    font-size: 36px;
    font-weight: bold;
}

解决方案

You need to have all kinds of font extensions on server to support all browsers.

@font-face { font-family: MyCustomFont;

src: url('ANGELINA.eot');
src: url('ANGELINA.eot?') format('☺'),
     url('ANGELINA.woff') format('woff'),
     url('ANGELINA.ttf') format('truetype'),
     url('ANGELINA.svg#webfontssbCkuz5') format('svg');

}

You can find all font extensions on this site http://www.google.com/webfonts

这篇关于FONT-FAMILY不活的服务器上正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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