馬老師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

背景重複模式,分為:

  1. no-repeat(不重複)
  2. repeat-x(橫向重複)
  3. repeat-y(縱向重複)
  4. repeat(全部重複)
background-attachment

背景附著模式,分為:

  1. fixed(固定)
  2. scroll(浮動)
background-position

背景位置

範圍與距離
width 寬度
height 高度
float 浮動
clear 清除浮動
padding 填充
margin 邊距

padding、margin的定義方法有兩種:

  1. 樣式名稱:上 右 下 左
  2. 樣式名稱-方向:值
邊框
border 邊框

border定義的方法有兩種:

  1. 樣式名稱:粗細 樣式 顏色
  2. 樣式名稱-顏色:值
    樣式名稱-風格:值
    樣式名稱-粗細:值
清單
list-style-type 清單樣式
list-style-image 清單圖示
listy-style-position 清單位置
位置
position

定位模式,分為:

  1. absolute(絕對)
  2. fixed(固定)
  3. relative(相對)
  4. static(靜態)
visibility

能見度,分為:

  1. inherit(繼承)
  2. visible(可見)
  3. hidden(隱藏)
top 上方距離
left 左側距離
right 右側距離
bottom 下方距離
overflow 溢位
其他
cursor 滑鼠游標,常用的手狀游標為:pointer