There is a page layout as follows:
<div id="content" > <p class="tag">第一段</p> <p class="tag">第二段</p> <p class="tag">第三段</p> </div>
For CSS2, it seems that there is only first-child
CSS3 will be fine
Reference: http://www.qianduan. net/taming-advanced-css-selectors.html
For CSS2, it seems that only first-child
CSS3 will be fine
Reference: http://www.qianduan.net/taming- advanced-css-selectors.html
Ah, it is indeed this ":nth-child(2)", right? It seems that only CSS3 can be used, but this thing works in IE8 or lower versions of IE Does it work?
For CSS2, it seems that there is only first-child
CSS3 is fine
Reference: http://www.qianduan.net/taming-advanced-css-selectors.html
Ah, it is indeed this ":nth-child(2)", right? It seems that only CSS3 can be used, but does this thing work in IE8 or lower versions of IE?
At first, if you are just trying to answer the specific scenario he proposed, CSS2 should also be able to
Use :first-child combined with :after
In CSS2, it seems that only first -child
CSS3 is no problem
Reference: http://www.qianduan.net/taming-advanced-css-selectors.html
Ah, it is indeed this ":nth-child" (2)" Right, it seems that only CSS3 can be used, but will this thing work in IE8 or lower versions of IE?
If I were to jump into the trap at first and just answer the specific scenario he proposed, CSS2 should also be able to
Use :first-child combined with :after
Indeed, I thought about choosing first at first. -child, and then select adjacent elements, but it seems to be too limiting, haha.
Well, thank you for your help!