:.nth-child(n){ }2、偶數(shù)標(biāo)簽
:.nth-child(2n)}
:.nth-child(even){ }3.奇數(shù)標(biāo)簽.
:.nth-child(2n- 1){}
:nth-child(odd){ }4、負(fù)防向范圍]選擇第1個到第5個
:.nth-child(-n + 5){ }5、[正方向范圍] 選擇從第5個開始的,到最后
:nth-child(n + 5){ }6、[限制范圍] 選擇第2個到第8個,取兩者的交集
:nth-child(-n+8).nth-child(n+2){}7.倒數(shù)第n個標(biāo)簽( n為數(shù)字)
:.nth-last-child(n){ }8、選擇第- -個( first-child表示選擇列表中的第一個標(biāo)簽)
:first-child{ }9.選擇最后-個( last-child表示選擇列表中的最后一個標(biāo)簽)
:last-child{ }我是有底線的
掃描二維碼手機(jī)查看該文章
文章引用:http://www.qingbaosc.com/news/webzhishi/1422.html




