DIV CSS 佈局教程網

您现在的位置: DIV+CSS佈局教程網 >> 網頁腳本 >  >> CSS入門知識 >> CSS詳解
常用 CSS 屬性速查:背景、邊框、文字、字體與定位
編輯:CSS詳解     

以下整理常見 CSS 屬性,方便開發時快速查閱。內容涵蓋背景、邊框、文字、字體、間距、尺寸、列表、表格與定位等常用分類。

背景屬性

background 可一次設定多個背景相關屬性,常見子屬性包含 background-color、background-image、background-position、background-repeat 與 background-attachment。

邊框與輪廓

border 用於設定元素邊框,可拆成 border-top、border-right、border-bottom、border-left,也能分別設定寬度、樣式與顏色。outline 則常用於焦點提示,不占據版面空間。

文字屬性

常見文字屬性包含 color、text-align、text-decoration、text-indent、line-height、letter-spacing、word-spacing、white-space 與 text-shadow。

字體屬性

font 是可一次設定多項字體樣式的簡寫屬性,常見子屬性包含 font-family、font-size、font-style、font-weight 與 font-variant。

外邊距與內邊距

margin 控制元素外部間距,padding 控制元素內部間距。兩者都可拆成上、右、下、左四個方向,也可使用簡寫一次設定。

尺寸屬性

常見尺寸屬性包含 width、height、min-width、max-width、min-height 與 max-height。響應式設計中常搭配百分比、rem 或 viewport 單位。

列表與表格

列表屬性包含 list-style、list-style-type、list-style-image 與 list-style-position。表格屬性則包含 border-collapse、border-spacing、caption-side、empty-cells 與 table-layout。

定位與堆疊

定位相關屬性包含 position、top、right、bottom、left、z-index、float、clear、display、visibility 與 overflow。這些屬性會直接影響元素在畫面上的呈現方式。

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved