How to target the last 3 lists together? I have tried using child selectors, but it allows us to target only one element simultaneously.
>Solution :
div > li:nth-last-child(-n+3) {
background-color: aqua;
}
<div>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</div>
