So here we take 6 colors then randomly append 2210 number of boxes each with one of the 6 colors chosen randomly with simple JavaScript. The boxes' animation-delay property is also set dynamically and incremented and that's how it works ;) See the code and feel free to play with it.