编辑:这个答案是建议使用加权的font-family
能够低于300
,考虑到大小写的问题。
为了更好地说明它,下面的片段例如被创建:(“木里”被使用的字体族只是用于示范,并且可以在Google Fonts找到):
body {
font-family: 'Muli', sans-serif;
}
.thin {
font-weight: 200;
}
.light {
font-weight: 300;
}
.regular {
font-weight: 400;
}
.bold {
font-weight: 600;
}
.extraBold {
font-weight: 700;
}
.black {
font-weight: 800;
}
.extraBlack {
font-weight: 900;
}
<link href="https://fonts.googleapis.com/css?family=Muli:200,300,400,600,700,800,900" rel="stylesheet">
<p class="thin">weight 200</p>
<p class="light">weight 300</p>
<p class="regular">weight 400</p>
<p class="bold">weight 600</p>
<p class="extraBold">weight 700</p>
<p class="black">weight 800</p>
<p class="extraBlack">weight 900</p>
的'字体重量“属性只适用于重量变体可用于该字体。 – Terry