1.动态伪类
1.1 锚点伪类
:link, :vistied
1.2 用户行为伪类
:hover, :active, :foucs
2.UI元素状态伪类
3.CSS3结构类
3.1 first-child
一般配合 对应 html标签使用
3.2 last-Child
同上
3.3nth-child(N)
3.3.1
3.4nth-last-child(N)
3.5nth-of-type(N)
只数 div
3.6nth-last-of-type(N)
同上
3.7 first-of-type
3.8 last-of-type
3.9 only-child
3.10 only-of-type
3.10 empty
4.否定选择器
CSS 权重
5.伪元素
5.1 Element::first-line
5.2 Element::first-letter
5.3 Element::before
5.4 Element::after《最实用》
// 清楚浮动
//after 清楚浮动
5.5 Element::selection
网友评论