我已经从Google Web字体下载了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,Chrome,Safari和Firefox中看起来都不错。
这是我的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">About Us</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
,并提供您在API调用中要求的Open Sans Condensed
。
See here