Add color to the last-child – CSS
.d1 { display: flex; justify-content: space-between; } .d1>div { display: flex; flex-direction: column-reverse; justify-content: flex-end; } .d1>div>span:last-child { color: green; font-size: 30px; } .d1>div>span:nth-child(2n) { color: red; } .d1>div>span:nth-child(2n+1) { color: blue; } <div class="d1"> <div> <span>2</span> <span>+3</span> <span>5</span> <span>+6</span>…