选择第一个到第六个li元素
ul li:nth-child(n+3):not(:nth-child(n+6)){}
选择第二个到最后一个
ul li:nth-child(2)~li{}
选择除了第一个和最后一个
ul li:not(:first-child):not(:last-child){}
转载于:https://www.cnblogs.com/dianzan/p/7355959.html
选择第一个到第六个li元素
ul li:nth-child(n+3):not(:nth-child(n+6)){}
选择第二个到最后一个
ul li:nth-child(2)~li{}
选择除了第一个和最后一个
ul li:not(:first-child):not(:last-child){}
转载于:https://www.cnblogs.com/dianzan/p/7355959.html