html页面字体相关

 1 <!doctype html>
 2 <html>
 3 <head>
 4 <meta charset="utf-8"/>
 5 <title>字体设置</title>
 6 
 7 <style type="text/css">
 8 #fw{
 9     font-weight: bold;
10 }
11 #fs{
12     font-style: italic;
13 }
14 
15 </style>
16 </head>
17 <body>
18 
19 <div id="fw">这是一段加粗文字</div>
20 <div id="fs">这是一段倾斜的文字</div>
21 
22 <!-- 
23     font            文字
24     font-weight        文字着重
25     font-size        文字大小(一般为偶数)
26     font-style     文字倾斜
27     line-height        文字行高
28     font-family        字体(中文默认宋体)
29  -->
30 <!-- 
31     font-weight        文字加粗
32     bold                加粗
33     normal            正常
34  -->
35  <!-- 
36      font-style         文字倾斜
37      italic            倾斜
38      normal            正常
39   -->
40 
41 <!-- 
42     font-family        字体
43     “主要字体”“备用字体1”“备用字体2”
44  -->
45 </body>
46 </html>
原文地址:https://www.cnblogs.com/swust-wangyf/p/6786103.html