馬老師CSS2重要樣式說明
文字相關 | |
---|---|
font-family | 字型 |
font-size | 文字大小 |
font-style | 文字樣式(斜體、偏斜體) |
font-weight | 文字重量(粗體) |
font-variant | 小型大寫字 |
text-transform | 大小寫轉換 |
color | 文字顏色 |
text-decoration: underline | 底線 |
text-decoration: line-through | 刪除線 |
段落相關 | |
line-height | 行距 |
text-align | 段落(內容)對齊 |
text-indent | 第一行縮排 |
letter-spacing | 字元間距 |
display | 顯示模式 |
背景 | |
background-color | 背景顏色 |
background-image | 背景圖片 |
background-repeat | 背景重複模式,分為:
|
background-attachment | 背景附著模式,分為:
|
background-position | 背景位置 |
範圍與距離 | |
width | 寬度 |
height | 高度 |
float | 浮動 |
clear | 清除浮動 |
padding | 填充 |
margin | 邊距 |
padding、margin的定義方法有兩種:
|
|
邊框 | |
border | 邊框 |
border定義的方法有兩種:
|
|
清單 | |
list-style-type | 清單樣式 |
list-style-image | 清單圖示 |
listy-style-position | 清單位置 |
位置 | |
position | 定位模式,分為:
|
visibility | 能見度,分為:
|
top | 上方距離 |
left | 左側距離 |
right | 右側距離 |
bottom | 下方距離 |
overflow | 溢位 |
其他 | |
cursor | 滑鼠游標,常用的手狀游標為:pointer |