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;}
本文共 301 字,大约阅读时间需要 1 分钟。
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;}
转载于:https://www.cnblogs.com/Answer1215/p/5180883.html