CSS 屬性表簡表,列出了一些我們常用的CSS的屬性。
屬性名稱屬性含義屬性值
字體屬性(Font)
以下為引用的內容: font-family 使用什麼字體所有的字體 font-style 字體是否斜體Normal、italic、oblique font-variant 是否用小體大寫Normal、small-caps font-weight 字體的粗細Normal、bold、bolder、lithter等 font-size 字體的大小Absolute-size、relative-size、length、percentage等 |
顏色和背景屬性
以下為引用的內容: Color 定義前景色顏色 Background-color 定義背景色顏色 Background-image 定義背景圖案路徑 Background-repeat 重複方式Repeat-x、repeat-y、no-repeat Background-attachment 設定滾動Scroll、Fixed Background-position 初始位置Percentage、length、top、left、right、bottom等 |
文字屬性
以下為引用的內容: Word-spacing 字之間的間距Normal <length> Letter-spacing 字母之間的間距Normal <length> Text-decoration 文字的裝飾樣式None|underline|overline|line-through|blink Vertical-align 垂直方向的位置Baseline|sub|super|top|text-top|middle|bottom|text-bottom Text-transform 文字轉換Capitalize|uppercase|lowercase|none Text-align 對齊方式Left|right|center|justify Text-indent 首行的縮排方式<length>|<percentage> Line-height 文字的行高Normal|<number>|<length>|<percentage> |
邊距屬性
以下為引用的內容: Margin-top 頂端邊距Length|percentage|auto Margin-right 右側邊距Length|percentage|auto Margin-bottom 底端邊距Length|percentage|auto Margin-left 左側邊距Length|percentage|auto |
填充距屬性
以下為引用的內容: Padding-top 頂端填充距Length|percentage Padding-right 右側填充距Length|percentage Padding-bottom 底端填充距Length|percentage Padding-left 左側填充距Length|percentage |
邊框屬性
以下為引用的內容: Border-top-width 頂端邊框寬度Thin|medium|thick|length Border-right-width 右側邊框寬度Thin|medium|thick|length Border-bottom-width 底端邊框寬度Thin|medium|thick|length Border-left-width 左側邊框寬度Thin|medium|thick|length Border-width 一次定義寬度Thin|medium|thick|length Border-color 設定邊框顏色Color Border-style 設定邊框樣式None|dotted|dash|solid等 Border-top 一次定義頂端Border-top-width|color等 Border-right 一次定義右側Border-top-width|color等 Border-bottom 一次定義底端Border-top-width|color等 Border-left 一次定義左側Border-top-width|color等 Width 定義寬度屬性Length|percentage|auto Height 定義高度屬性Length|auto Float 文字環繞Left|right|none Clear 哪一邊環繞Left|right|none|both |
分級屬性
以下為引用的內容: Display 定義是否顯示Block、inline、list-item、none White-space 怎麼處理空白Normal、pre、nowrap List-style-type 加項目編號Disc、circle、square等 List-style-image 加圖案<url>|none List-style-position 第二行起始位置Inside、outside List-style 一次定義列表<keyword>|<position>|<url> |
滑鼠( Cursor ) 屬性
以下為引用的內容: Auto 自動 |