tap选择器 ul
class选择器 .
id选择器 #
后代选择器 a b
子代选择器 a>b
兄弟选择器 a + b 以a为参考给b加样式
属性选择器 input [type="text"]

css3新增选择器
:not 不包含某项 如 :not(:last-child)
:nth-child 第几项 只考虑自己的子集
:nth-child(odd)/:nth-child(2n-1)代表奇数行
:nth-child(even)/:nth-child(2n)代表偶数数行
:nth-last-child 最后一个元素
:only-child() 匹配父元素仅仅只有一个子元素
如span:onli-child 仅仅只有一个span子元素
:nth-of-type 第几个兄弟元素 会进行深度解析
:checked 被选中后

当然还很有多选择器 列举一些常用的 =_=

转载于:https://www.cnblogs.com/geekris1/p/9762914.html