如何设置字体的粗细 登录

如何设置字体的粗细

实例解析:

font-weight属性用于设置文本的粗细。

可以设置以下属性值:

描述
normal默认值,定义标准的字符。
bold定义粗体字符。
bolder定义更粗的字符。
lighter定义更细的字符。

○ 100

○ 200

○ 300

○ 400

○ 500

○ 600

○ 700

○ 800

○ 900     

定义由粗到细的字符。400 等同于 normal,而 700 等同于 bold。





        

        

        

        

   


下一节
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> <style> p.normal {font-weight:normal;} p.light {font-weight:lighter;} p.thick {font-weight:bold;} p.thicker {font-weight:900;} </style> </head> <body> <p class="normal">This is a paragraph.</p> <p class="light">This is a paragraph.</p> <p class="thick">This is a paragraph.</p> <p class="thicker">This is a paragraph.</p> </body> </html>
提交 重置代码
章节 评论 笔记 课件
  • 取消 回复 发送
  • 取消 发布笔记 发送