【发布时间】:2013-02-01 16:50:15
【问题描述】:
我正在尝试使用我的字体的“较轻”版本,但在 Firefox 和 chrome 中它仍然显示为“正常”重量。
这是我的 font.css:
@font-face {
font-family: Avenir;
font-weight: normal;
src: url("AvenirLTStd-Medium.otf") format("opentype");
}
@font-face {
font-family: Avenir;
font-weight: bold;
src: url("AvenirLTStd-Black.otf") format("opentype");
}
@font-face {
font-family: Avenir;
font-weight: lighter;
src: url("12-Avenir-Light.ttf") format("opentype");
}
这是我用来在#home 中激活H2 上的“更轻”重量的方法:
body {
background: none repeat scroll 0 0 #DADAD2;
font-family: 'Avenir',sans-serif;
font-weight: normal;
}
#home .six.columns h2 {
color: #FAFAFA;
display: block;
font-size: 1.8em;
font-weight: lighter;
letter-spacing: 0.3em;
margin-top: 25%;
text-align: center;
}
您可以在这里看到我在说什么(只需将鼠标悬停在其中一张产品图片上):
【问题讨论】:
-
将
font-weight值更改为500、600、700、800、900和bold中的任何一个肯定会更改文本。所有其他值显示为“正常”。我不是说这是正确;我只是添加一些额外的细节。 -
@JamesA.Rosen 你是在说我的网站吗?我知道这很奇怪,因为“较轻”值应该将文本更改为较细的字体变体。
-
我同意。我正在确认并添加一些额外的细节,希望它可能对其他人有用。
-
感谢詹姆斯的帮助!
-
相关:stackoverflow.com/questions/10627810/…。不幸的是,使用
100解决了这个问题,但这里没有。你确定有问题的字体有更轻的版本吗?