好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CSS文字排版需要用到的属性

字体样式属性 font-size:字号大小

font-size属性用于设置字号,该属性的值可以使用相对长度单位,也可以使用绝对长度单位。其中, 相对长度单位比较常用,推荐使用像素单位px ,绝对长度单位使用较少。

绝对单位可选参数值:xx-small | x-small | small | medium | large | x-large | xx-large|smaller | larger

 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4     <meta charset="UTF-8"> 5     <title>font-size:字号大小</title> 6  7     <style type="text/css"> 8         #p1 {font-size: 14pt;} 9         #p2 {font-size: 16pt;}10         #p3 {font-size: x-small;}11         #p4 {font-size: small;}12         #p5 {font-size: medium;}13         #p6 {font-size: large;}14         #p7 {font-size: xx-large;}15     </style>16 </head>17 <body>18     <p id="p1">font-size:字号大小</p>19     <p id="p2">font-size:字号大小</p>20     <p id="p3">font-size:字号大小</p>21     <p id="p4">font-size:字号大小</p>22     <p id="p5">font-size:字号大小</p>23     <p id="p6">font-size:字号大小</p>24     <p id="p7">font-size:字号大小</p>25 </body>26 </html> 

查看更多关于CSS文字排版需要用到的属性的详细内容...

  阅读:41次