核心提示:CSS3新增的伪类介绍p:first-of-type: 父元素中第一个p子元素p:lastt-of-type: 父元素中最后一个p子元素p:only-of-type: 父元素中唯一一个p子元素p:nt...
CSS3新增的伪类介绍
p:first-of-type: 父元素中第一个p子元素
p:lastt-of-type: 父元素中最后一个p子元素
p:only-of-type: 父元素中唯一一个p子元素
p:nth-of-type(n): 父元素中第n个p类型的p元素
p:nth-last-of-type(n): 父元素中倒数第n个p类型的p元素
p:only-child: 父元素中只有一个子元素,且该子元素为p的p元素
p:last-child: 父元素中最后一个子元素,且该子元素为p的p元素
p:nth-child(n): 父元素中第n个子元素是p的p元素
p:nth-last-child(n) 父元素中倒数第n个子元素是p的p元素
p:empty 没有子元素的p元素
p:enable 选择每个已启动的元素
p:disable 选择每个已禁止的元素
p:chacked 选择每个被选中的元素