2011-12-20

CSS字型與文字設定

字型
1.font-family:字型種類,依順序套用,可以逗號「,」隔開。
如:code{font-family:新細明體,標楷體,Time new roman;}

2.font-style:字型樣式,有正常(normal)、斜體(italic)
如:code{font-style:italic;}

3.font-weight:字型份量(字體粗細),有正常(normal)、粗體(bold)
如:code{font-weight:bold;}

4.font-size:字型大小,可用絕對尺寸、相對尺寸、大小、百分比。
絕對尺寸(xx-small,x-small,small,medium,large,x-large,xx-large):如:code{font-size:x-large;}
相對尺寸(larger,smaller):如:code{font-size:larger;}
大小(pt):如:code{font-size:15pt;}
百分比(%):如:code{font-size:150%;}

==============================================================
文字性質
1.text-decoration:文字裝飾形態,有無底線(none),底線(underline),字劃線(line-through)。
如:code{text-decoration:underline;}

2.text-align:文字對齊方式,置左(left)、置中(center)、置右(right)、左右對齊(justify)
如:code{text-align:left;}

3.line-height:文字行距,可以是長度值或百分比。
如:code{line-height:120%;}

沒有留言: