How to write the css that appears in the cycle of three styles?

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?

Mar.01,2021

3n+1
3n+2
3n

Menu