CSS字体实例:设置字体的粗细

作者:风筝 | 创建时间: 2023-06-04
CSS 代码均位于 HTML 的 head 部分,这样做的目的是为了利于演示例子本身。在实际的开发中,使用 CSS 最好的方式是引用外部样式表。 这里介绍CSS字体实例:设置字体的粗细...
CSS字体实例:设置字体的粗细

步骤/方法

<html> <head> <style type="text/css"> p.normal {font-weight: normal} p.thick {font-weight: bold} p.thicker {font-weight: 900} </style> </head> <body> <p class="normal">This is a paragraph</p> <p class="thick">This is a paragraph</p> <p class="thicker">This is a paragraph</p> </body> </html>

(字体粗细)结果运行为

温馨提示

本文仅供参考
点击展开全文

更多推荐