CSS:層疊樣式表,是給標簽(html)添加樣式的 (鍵對值:屬性:屬性值;)
(備注:html超文本標記語言,是標記語言,不是編程語言,說白了就是標簽。標簽:<標簽名>)
一、文本的樣式(text)
1、顏色
color:red;
2、文本對齊方式
text-align:left;(左對齊)
text-align:center;(居中)
text-align:right;(右對齊)
text-align:justify(兩端對齊)
3、文本修飾
text-decoration:none;(什么都沒有)
text-decoration: overline; (上划線)
text-decoration:line-through; (刪除線)
text-decoration:underline; (下划線)
4、文本轉換
text-transform:uppercase; (大寫字母)
text-transform: lowercase; (小寫字母)
text-transform: capitalize; (以大寫字母寫)
5、文本縮進
text-indent:20px;
二、字體(font)
1、字體大小
font-size:20px;
2、字體顏色
color:red;
3、字體樣式
font-style:normal;(正常的)
font-style:italic; (斜體)
font-style:oblique; (傾斜)
font-style:inherit; (繼承父級樣式)
4、字形
font-family:"微軟雅黑"; (系統默認)
5、加粗
font-weight:normal;(系統默認)
font-weight:bold; (粗體)
font-weight:bolder; (更粗)
font-weight:lighter; (更細)
(備注:font-weight:可以寫數字,后面不用加px 400等於normal 700等於bold 比400小是變細,比400大是變粗)