add a style after traversing the array. The style code is as follows. The effect is shown in figure
..content .box:nth-child(n+1) {
background: linear-gradient(to bottom, -sharp79E2FF, -sharp66A8FF);
}
.content .box:nth-child(n+2) {
background: linear-gradient(to bottom, -sharpFFD61C, -sharpF4A80F);
}
.content .box:nth-child(n+3) {
background: linear-gradient(to bottom, -sharpFF7984, -sharpF42C5F);
}
how do I make these three styles appear in a loop?