标签:需要 大于 等于 表示 pre round n+1 ret 数字
.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
标签:需要 大于 等于 表示 pre round n+1 ret 数字
原文地址:http://www.cnblogs.com/frost-yen/p/6956055.html