问题
I want do something like that: I trying to ul first-child but no result. :(.
<ul>
<li></li> /* + :before */
<li></li> /* + :before */
<li>
<ul>
<li></li> /* remove :before or never create :before */
</ul>
</li> /* + :before */
<li></li> /* + :before */
</ul>
please help.
回答1:
:first-child
just gets you the first child. If you want to remove :before
from nested li
s, set content: none
for those li
s:
ul li li:before {
content: none;
}
来源:https://stackoverflow.com/questions/19106066/ul-li-li-remove-before-after-in-second-level