Skip to content

Instantly share code, notes, and snippets.

@suziewong
Last active December 12, 2015 06:28
Show Gist options
  • Save suziewong/4728956 to your computer and use it in GitHub Desktop.
Save suziewong/4728956 to your computer and use it in GitHub Desktop.
CSS3 选择器
CSS 选择器
====================
CSS1&2 关系选择器
CSS1&2元素选择器
* 通配选择器
E 类型选择器
E#id
E.class
E F 包含选择器
E>F 子选择器 选择所有作为E元素的子元素F
E+F 相邻选择器 选择紧贴E之后的F元素
伪类选择器
E:link
E:visited
E:hover 鼠标悬停
E:active
E:focus
E:lang()
结构伪类选择器
E:root
E:last-child
E:last-child
E:only-child
E:nth-child(n)
E:nth-last-child(n)
E:first-of-type
E:last-of-type
E:only-of-type
E:nth-of-type(n) odd even
E:nth-last-of-type(n)
E:empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment