css設置文字思源雅黑,分爲medium, regular, light

html引入思源黑體

經過Link標籤在網頁頭部引用Google Web Font:css

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:100,300,400,500,700,900">
  • 字體:Noto Sans SC
  • 大小:100, 300, 400, 500, 700, 900

在須要使用思源黑體的地方設置CSS樣式:html

font-family: "Noto Sans SC"; font-weight: 100;

TIP:Link標籤的rel屬性的全稱是relationship,表示引用內容與當前HTML的關係。api

 

Regular、Normal、Medium、Light 對應的font-weight值

字體粗細:‘font-weight’屬性
名稱: font-weight
取值: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
初始: normal
100 - Thin
200 - Extra Light (Ultra Light)
300 - Light
400 - Regular (Normal、Book、Roman)
500 - Medium
600 - Semi Bold (Demi Bold)
700 - Bold
800 - Extra Bold (Ultra Bold)
900 - Black (Heavy)











字體

normal、regular與'400'相同。
bold與'700'相同。
bolder指定外觀的重量大於繼承的值。
lighter 指定外觀的重量小於繼承的值。
詳見W3C Fonts節章的規範標準



google

相關文章
相關標籤/搜索