在css当中我们常会用到font-weight,它也有一些常用的值,下面就汇总一下常见的值可能有一些你还不知道。
首先常见的别名变量值和对应的值汇总如下:
/* 关键值变量 */
font-weight: normal;
font-weight: bold;
/* 相对值*/
font-weight: lighter;
font-weight: bolder;
/* 常用数值 */
font-weight: 100;
font-weight: 200;
font-weight: 300;
font-weight: 400; /* 等同于normal */
font-weight: 500;
font-weight: 600;
font-weight: 700; /* 等同于bold */
font-weight: 800;
font-weight: 900;
/* 全局变量值 */
font-weight: inherit;
font-weight: initial;
font-weight: revert;
font-weight: unset;
下面还有一些常用的别名变量值如下:
| Value | Common weight name |
|---|---|
| 100 | Thin (Hairline) |
| 200 | Extra Light (Ultra Light) |
| 300 | Light |
| 400 | Normal (Regular) |
| 500 | Medium |
| 600 | Semi Bold (Demi Bold) |
| 700 | Bold |
| 800 | Extra Bold (Ultra Bold) |
| 900 | Black (Heavy) |
| 950 | Extra Black (Ultra Black) |
https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
lebang2020.cn