Is it possible to select multiple children past a defined number with CSS selectors?
I'd like to hide all list items past #3:
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li> <!-- hide this -->
<li>5</li> <!-- hide this -->
</ul>
<style>
ul li:nth-child(X) {
display: none;
}
</style>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…