首页 > Web开发 > 详细

css设置文字思源雅黑,分为medium, regular, light

时间:2020-07-14 16:18:12      阅读:59      评论:0      收藏:0      [点我收藏+]

html引入思源黑体

通过Link标签在网页头部引用Google Web Font:

<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样式:

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

TIP:Link标签的rel属性的全称是relationship,表示引用内容与当前HTML的关系。

 

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节章的规范标准

css设置文字思源雅黑,分为medium, regular, light

原文:https://www.cnblogs.com/chenyingying0/p/13299185.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!