Afecte a los 3 primeros elementos por ejemplo

usando :nth-child(-n + 3)

li:nth-child(-n + 3) {
 border: 2px solid orange;
 margin-bottom: 1px;
}