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 自動 |
新聞熱點
疑難解答