我正在尝试使用字体的“较轻”版本,但在 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");
}
这是我用来激活“更轻”重量的H2
方法#home
:
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;
}
您可以在这里看到我在说什么(只需将鼠标悬停在其中一张产品图片上):