not
:not选择器 解决消失的边界线问题
/* 去掉边框 */.nav li:last-child {border-right: none;}不过不要这么做,使用 :not() 伪类来达到同样的效果:.nav li:not(:last-child) {border-right: 1px solid #666;}
同级变淡
// 选择一个没有href、target、rel属性的标签
a:not([href]):not([target]):not([rel]){
border: 1px solid blue;
}
hover+not

负nth-child
负的nth-child
li {
display: none;
}
/* 选择第 1 至第 3 个元素并显示出来 */
li:nth-child(-n+3) {
display: block;
}
或许你已经掌握了如何使用 :not()这个技巧,试下这个:
/* 选择除前3个之外的所有项目,并显示它们 */
li:not(:nth-child(-n+3)) {
display: none;
}
猫头鹰选择器
通用选择器 (``) 和 相邻兄弟选择
http://alistapart.com/article/axiomatic-css-and-lobotomized-owls/
