for example:
<ul>
<li>one</li> <- style this one
<li>two</li> <- also this one
<li>tree</li> <- but not this one, because no other li follows
</ul>
I guess you can only do it by overwriting the style of the last element back to the default-style
for example:
li {
background: #000000f0;
}
li:last-child {
background: none;
}
your guess is right, use li:last-child and you are good to go. Or you can complicate your life with something like:
li::not(:last-child)