attribute selectors
边框(Border)
Border-color
Border-image
Border-radius
box-shadow
背景(Background)
background-origin
background-clip
Background-size
Multiple backgrounds
颜色(Color)
HSL colors
HSLA colors
opacity
RGBA colors
文本(Text effects)
text-shadow
text-overflow
word-wrap
用户界面(User-interface)
box-sizing
resize
outline
outline-width
outline-style
outline-offset
outline-color
nav-index
nav-up
nav-right
nav-down
nav-left
基础盒模型(Basic box model)
overflow
overflow-x
overflow-y
内容(Generated Content)
content
其它模块(Other modules)
media queries
Speech
columns
column-width
column-span
column-rule
column-rule-color
column-rule-width
column-rule-style
column-gap
column-fill
column-count
column-break-before
column-break-after
@font-face

选择器(selectors)

子串匹配的属性选择符 E[att^="val"]
子串匹配的属性选择符 E[att$="val"]
子串匹配的属性选择符 E[att*="val"]
结构性伪类 E:root
结构性伪类 E:nth-child(n)
结构性伪类 E:nth-last-child(n)
结构性伪类 E:nth-of-type(n)
结构性伪类E:nth-last-of-type(n)
结构性伪类 E:last-child
结构性伪类 E:first-of-type
结构性伪类 E:only-child
结构性伪类 E:only-of-type
结构性伪类 E:empty
UI元素状态伪类 E:checked
UI元素状态伪类 E:enabled
UI元素状态伪类 E:disabled
UI元素状态伪类 E::selection
否定伪类 E:not(s)
目标伪类 E:target
通用兄弟元素选择器 E ~ F

说明:

子串匹配的属性选择器,具体规则与正则中的匹配相似。

对照表:

选择符类型 表达式 描述
子串匹配的属性选择符 E[att^="val"] 匹配具有att属性、且值以val开头的E元素
子串匹配的属性选择符 E[att$="val"] 匹配具有att属性、且值以val结尾的E元素
子串匹配的属性选择符 E[att*="val"] 匹配具有att属性、且值中含有val的E元素
结构性伪类 E:root 匹配文档的根元素。在HTML中,根元素永远是HTML
结构性伪类 E:nth-child(n) 匹配父元素中的第n个子元素E
结构性伪类 E:nth-last-child(n) 匹配父元素中的倒数第n个结构子元素E
结构性伪类 E:nth-of-type(n) 匹配同类型中的第n个同级兄弟元素E
结构性伪类 E:nth-last-of-type(n) 匹配同类型中的倒数第n个同级兄弟元素E
结构性伪类 E:last-child 匹配父元素中最后一个E元素
结构性伪类 E:first-of-type 匹配同级兄弟元素中的第一个E元素
结构性伪类 E:only-child 匹配属于父元素中唯一子元素的E
结构性伪类 E:only-of-type 匹配属于同类型中唯一兄弟元素的E
结构性伪类 E:empty 匹配没有任何子元素(包括text节点)的元素E
目标伪类 :target 匹配相关URL指向的E元素
UI元素状态伪类 E:enabled 匹配所有用户界面(form表单)中处于可用状态的E元素
UI元素状态伪类 E:disabled 匹配所有用户界面(form表单)中处于不可用状态的E元素
UI元素状态伪类 E:checked 匹配所有用户界面(form表单)中处于选中状态的元素E
UI元素状态伪类 E::selection 匹配E元素中被用户选中或处于高亮状态的部分
否定伪类 E:not(s) 匹配所有不匹配简单选择符s的元素E
通用兄弟元素选择器 E ~ F 匹配E元素之后的F元素