• :root 根元素,他始终是html元素

  • :not(x) 否定伪类选择器。 x是一个选择器,not()可以看出一个否定元素,最终的结果不满足x的被选中

    /*选中id不是abc的div*/
    div:not(#abc){
        background-color: green;
    }
    
  • :empty 没有子元素的被选中。

  • :nth-child(n)n个子元素

  • :nth-last-child(n) 从后向前计算的第n个子元素

  • :nth-of-type(n)n个子元素

  • :nth-last-of-type(n) 从后向前计算的第n个子元素

Copyright © 李振超 2018 all right reserved,powered by Gitbook
该文件最后修订时间: 2018-10-18 03:21:02

results matching ""

    No results matching ""