[CSS] :not Selector

The CSS :not() selector allows us to exclude a subset of elements matched by our selector. In this example we refactor two selectors down to one using the CSS :not() selector.

 

.FruitList li:not(:nth-child(2)) {
  border-bottom: 1px solid red;
}

 

posted @ 2016-02-04 05:49  Zhentiw  阅读(318)  评论(0编辑  收藏  举报