在Firefox上渲染Open Sans Light时出现问题 [英] Issue with rendering Open Sans Light on Firefox

查看:165
本文介绍了在Firefox上渲染Open Sans Light时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Open Sans Light在IE和Chrome上显示html页面没有问题,但是在使用Firefox的时候,它并不理解这种类型的字体。一个.css部分定义我的字体:

  .txtName 
{
margin-left:18px;
font-size:20px;
颜色:#0140be;
font-family:'Open Sans Light'!important;
font-weight:normal;
line-height:1.4em;





这是html文件的一部分,需要在IE上显示,Chrome和FF:

 < div class =txtName-Main> 
< h1 class =txtName>您的成功之路从这里开始< / h1>
< / div>

可能是什么问题?

Thx

解决方案

不是font-family的有效表示。 Open Sans的Light(300重量版)是:

在文档的头部:

 < link href ='http://fonts.googleapis.com/css?family = Open + Sans:300'rel ='stylesheet'type ='text / css' > 

在您的CSS中:

  font-family:'Open Sans',sans-serif; 
font-weight:300;


I have no problem displaying html pages on IE and Chrome using Open Sans Light, however when using Firefox, it does not understand this type of fonts.

This is a .css sections defining my fonts:

 .txtName
 {
     margin-left: 18px;
     font-size: 20px;
     color: #0140be;
     font-family: 'Open Sans Light' !important;
     font-weight:normal;
     line-height: 1.4em;   
 }

This is the part of html file that need to be displayed the same on IE, Chrome and FF:

<div class="txtName-Main">
     <h1 class="txtName">Your pathway to success starts here</h1>
</div>

What can be the problem?

Thx

解决方案

'Open Sans Light' is not a valid representation of the font-family. The 'Light' (300 weight) version of 'Open Sans' is:

In the head of your document:

<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>

In your CSS:

font-family: 'Open Sans', sans-serif;
font-weight: 300;

这篇关于在Firefox上渲染Open Sans Light时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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