字重(粗体) font-weight
<style> .weight { /* font-weight: bold; */ /* font-weight: bolder; */ /* font-weight: lighter; */ /* font-weight: normal; */ font-weight: 100; } </style> <body class="body" id="body"> <div class="weight">你好 hello world</div> </body>
font-weight数值有100~900,9个值,200可以,250就不可以。逐渐变粗,但不是每个字体都支持这9种粗细的。默认的值是多少呢,一般normal是400,bold是700。bolder和lighter的值是不定的,一般取决于父级继承下来是多少。实际使用中也用的比较少
原文:https://www.cnblogs.com/wzndkj/p/10348456.html