好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

css各种选择器的详细介绍

35. E:nth-of-type(n) 与 :nth-child()作用类似,但是仅匹配使用同种标签的元素

36. E:nth-last-of-type(n) 与 :nth-last-child() 作用类似,但是仅匹配使用同种标签的元素

37. E:last-child 匹配父元素的最后一个子元素,等同于 :nth-last-child(1)

38. E:first-of-type 匹配父元素下使用同种标签的第一个子元素,等同于 :nth-of-type(1)

39. E:last-of-type 匹配父元素下使用同种标签的最后一个子元素,等同于 :nth-last-of-type(1)

40. E:only-child 匹配父元素下仅有的一个子元素,等同于 :first-child:last-child或 :nth-child(1):nth-last-child(1)

41. E:only-of-type 匹配父元素下使用同种标签的唯一一个子元素,等同于 :first-of-type:last-of-type或 :nth-of-type(1):nth-last-of-type(1)

42. E:empty 匹配一个不包含任何子元素的元素,注意,文本节点也被看作子元素

十、 CSS 3的反选伪类

43. E:not(s) 匹配不符合当前选择器的任何元素

十一、 CSS 3中的 :target 伪类

44. E:target 匹配文档中特定 "id"点击后的效果

以上就是css各种选择器的详细介绍的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于css各种选择器的详细介绍的详细内容...

  阅读:32次