如何設定字體的粗細
實例解析:
font-weight屬性用於設定文字的粗細。
可以設定下列屬性值:
| #值 | ##描述|
|---|---|
| 預設值,定義標準的字元。 | |
| 定義粗體字元。 | |
| 定義較粗的字元。 | |
| 定義更細的字元。 | |
| #○ 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>
預覽
Clear
- 課程推薦
- 課件下載
課件暫不提供下載,工作人員正在整理中,後期請多關注該課程~ 















