css文本設置
阿新 • • 發佈:2017-12-17
是否 align 常用 color 去掉 ali height 文字 enter
常用的應用文本的css樣式:
-
color 設置文字的顏色,如: color:red;
-
font-size 設置文字的大小,如:font-size:12px;
-
font-family 設置文字的字體,如:font-family:‘微軟雅黑‘;
-
font-style 設置字體是否傾斜,如:font-style:‘normal‘; 設置不傾斜,font-style:‘italic‘;設置文字傾斜
-
font-weight 設置文字是否加粗,如:font-weight:bold; 設置加粗 font-weight:normal 設置不加粗
-
font 同時設置文字的幾個屬性,寫的順序有兼容問題,建議按照如下順序寫: font:是否加粗 字號/行高 字體;如: font:normal 12px/36px ‘微軟雅黑‘;
-
line-height 設置文字的行高,如:line-height:24px;
-
text-decoration 設置文字的下劃線,如:text-decoration:none; 將文字下劃線去掉
-
text-indent 設置文字首行縮進,如:text-indent:24px; 設置文字首行縮進24px
-
text-align 設置文字水平對齊方式,如text-align:center 設置文字水平居中
css文本設置