CSS3偽類選擇器:nth-child()(nth-child(odd)/nth-child(even))
nth-child(odd):奇數
nth-child(even):偶數
使用時,如果是精確到數字時,切記是從同一級別的元素開始計算,而不是指定某個類才開始計算。
比如:
<li></li>
<li class=”test”></li>
<li></li>
如果我要選擇class為test的,nth-child(2),第2個。
詳細解釋,參考:
http://niutuku.com/tech/css/249737.shtml
==>如有問題,請聯絡我:easonjim#163.com,或者下方發表評論。<==
相關文章
- css3 nth-child選擇器CSSS3
- css3 nth-child() 選擇器 (遍歷選擇器的奇偶數)CSSS3
- nth-child() 選擇器用法詳解
- nth-of-type()和nth-child()選擇器的區別
- jQuery :nth-child()jQuery
- :nth-child選擇器使用程式碼例項
- CSS E:nth-child(n)CSS
- nth-child和nth-of-type這倆偽類有毛關係?
- 淚目了!CSS nth-child偽類終於支援了of關鍵詞CSS
- 【CSS】nth-child 與 nth-of-type辨析CSS
- (?<=p)與:nth-child()的相似性分析
- CSS3新增選擇器(屬性選擇器、結構偽類選擇器、偽元素選擇器)CSSS3
- 教你發現CSS3的"nth-child"和"nth-of-type"的區別!CSSS3
- CSS中nth-child和nth-of-type的簡單使用CSS
- CSS 偽類選擇器CSS
- 002---選擇器(標籤選擇器、類選擇器、id選擇器、偽類選擇器、萬用字元選擇器)字元
- CSS E:default 偽類選擇器CSS
- CSS E:disabled偽類選擇器CSS
- CSS E:disabled 偽類選擇器CSS
- CSS E:checked 偽類選擇器CSS
- CSS E:hover偽類選擇器CSS
- CSS E:hover 偽類選擇器CSS
- CSS偽類與偽元素選擇器區別CSS
- CSS :focus-within 偽類選擇器CSS
- CSS偽類選擇器是什麼CSS
- CSS @page:left列印偽類選擇器CSS
- CSS @page:first列印偽類選擇器CSS
- CSS樣式中的通用選擇器和偽類選擇器CSS
- 偽類選擇器:愛恨法則;偽元素選擇器:before,after;清除浮動
- 一個選擇器工具。測試結構偽類選擇器方法
- HTML表單及CSS選擇器、偽類和偽元素HTMLCSS
- css偽類選擇符CSS
- CSS @page:right列印偽類選擇器CSS
- CSS的總結(選擇器,偽類等…)CSS
- 徹底理解CSS結構偽類選擇器CSS
- CSS 連結偽類選擇器順序原理CSS
- css :target偽類選擇器簡單介紹CSS
- css3偽元素選擇器before 和 after 的使用CSSS3