ul li:nth-last-child(n+5),ul li:nth-last-child(n+5) ~ li {
//styles goes here
}
at-most
ul li:nth-last-child(-n+5):first-child,ul li:nth-last-child(-n+5):first-child ~ li {
//styles goes here
}
in-between
ul li:nth-last-child(n+5):nth-last-child(-n+10):first-child,
ul li:nth-last-child(n+5):nth-last-child(-n+10):first-child ~ li {
//styles goes hereā¦
}