CSS

CSS是Cascading Style Sheets縮寫,中文翻譯成串接樣式表,顧名思義,CSS的用途是設定網頁如何顯示的一種語言。

這裡所說的CSS指的是CSS 2.1,也就是Cascading Style Sheets Level 2 Revision 1,這是CSS第2級的第1個修訂版本,CSS規格不用版本(version)做區別,而是以級(level)劃分,可以參閱CSS標準化程序的說明。一般來說,CSS如果沒有特別說明都是指CSS 2.1,因為這是目前最普遍用在網頁設計上的標準。

語法(Syntax)與基本資料型態(Basic Data Types)

選擇器(Selectors)

串接(Cascading)

繼承(Inheritance)

媒體類型(Media Types)

總共98個屬性

箱子模型(Box Model), 13

    • margin-top, margin-bottom

    • margin-right, margin-left

    • margin

    • padding-top, padding-right, padding-bottom, padding-left

    • padding

    • border-top-width, border-right-width, border-bottom-width, border-left-width

    • border-width

    • border-top-color, border-right-color, border-bottom-color, border-left-color

    • border-color

    • border-top-style, border-right-style, border-bottom-style, border-left-style

    • border-style

    • border-top, border-right, border-bottom, border-left

    • border

視覺編排模型(Visual Formatting Model), 19

    • display

    • position

    • top

    • right

    • bottom

    • left

    • float

    • clear

    • z-index

    • direction

    • unicode-bidi

    • width

    • min-width

    • max-width

    • height

    • min-height

    • max-height

    • line-height

    • vertical-align

視覺效果(Visual Effects), 3

    • overflow

    • clip

    • visibility

清單(Lists), 8

    • content

    • quotes

    • counter-reset

    • counter-increment

    • list-style-type

    • list-style-image

    • list-style-position

    • list-style

頁面媒體(Paged ), 5

    • page-break-before

    • page-break-after

    • page-break-inside

    • orphans

    • widows

顏色(Colors)與背景(Backgrounds), 7

    • color

    • background-color

    • background-image

    • background-repeat

    • background-attachment

    • background-position

    • background

字型(Fonts), 6

    • font-family

    • font-style

    • font-variant

    • font-weight

    • font-size

    • font

文字(Text), 7

    • text-indent

    • text-align

    • text-decoration

    • letter-spacing

    • word-spacing

    • text-transform

    • white-space

表格(Tables), 5

    • caption-side

    • table-layout

    • border-collapse

    • border-spacing

    • empty-cells

使用者介面(User Interface), 5

    • cursor

    • outline

    • outline-width

    • outline-style

    • outline-color

聽覺的樣式表(Aural Style Sheets), 20