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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36abf-2b57d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36abf-2b57d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?