Open Sans Condensed Light在Firefox中不工作 [英] Open Sans Condensed Light not working in Firefox

查看:143
本文介绍了Open Sans Condensed Light在Firefox中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已从Google Web Fonts下载了Open Sans Condensed Light字体,并附加了他们的CSS代码:

 < link href ='http://fonts.googleapis.com/css?family = Open + Sans + Condensed:300& subset = greek-ext& v2'
rel ='stylesheet' type ='text / css'>

但是除了Firefox之外,每个浏览器都显示确切的字体系列,ie在IE,Chrome,Safari



这是我的CSS和HTML代码:

  h2.title-border {
border-bottom:1px solid#000;
margin-top:10px;
line-height:45px;
margin-bottom:15px;
}

.heading-sub {
background:#000;
font-family:Open Sans Condensed Light;
font-weight:normal;
text-transform:none;
font-size:32px;
padding:0 15px;
margin-bottom:0px;
color:#fff;
border-bottom:1px solid#000;
}

HTML

 < h2 class =title-border>< span class =heading-sub> ; / span>< / h2>你可以建议,我应该如何解决Firefox这个问题吗?


解决方案

根据API,您应该像这样调用字体



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



需要特别调用 light 变体,即:light



其他浏览器可能会忽略您的样式表中的 Light ,并为您提供 Open您在API调用中请求的Sans Condensed



请参阅这里


I have downloaded the Open Sans Condensed Light font from Google Web Fonts, and also attached their CSS code:

<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300&subset=greek-ext&v2'
      rel='stylesheet' type='text/css'>

But every browser other than Firefox, shows exact font family i.e. it looks fine in IE, Chrome, Safari, but not in Firefox.

Here is my CSS and the HTML code:

h2.title-border {
    border-bottom: 1px solid #000;
    margin-top: 10px;
    line-height: 45px;
    margin-bottom: 15px;
}

.heading-sub {
    background: #000;
    font-family: "Open Sans Condensed Light";
    font-weight: normal;
    text-transform: none;
    font-size: 32px;
    padding: 0 15px;
    margin-bottom: 0px;
    color: #fff;
    border-bottom: 1px solid #000;
}

HTML:

<h2 class="title-border"><span class="heading-sub">About Us</span></h2>

Can you please suggest, how should I fix Firefox regarding this?

解决方案

According to the API, you should be calling the font like this

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

The light variant needs to be called specifically, i.e. :light.

The other browsers are probably ignoring the Light in your stylesheet and giving you the Open Sans Condensed you asked for in the API call.

See here

这篇关于Open Sans Condensed Light在Firefox中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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