.demo01 li:nth-child(2){background:#090}
.demo01 li:nth-child(n+4){background:#090}
.demo01 li:nth-child(-n+4){background:#090}
.demo01 li:nth-child(2n){background:#090}
.demo01 li:nth-child(2n-1){background:#090}
.demo01 li:nth-child(3n+1){background:#090}
.demo01 li:last-child{background:#090}
.demo01 li:nth-last-child(3){background:#090}
:nth-child的这些用法在实际中很用得着,不用单独给需要选取的标签加上ID或Class
原文:http://www.cnblogs.com/frost-yen/p/6956055.html