we can achieve it by using CSS3 :nth-child() Selector
Using a formula (an + b). Description: a represents a cycle size, n is a counter (starts at 0), and b is an offset value.
Here, we specify a css for all MyId elements whose index is a multiple of 3:
MyId:nth-child(3n+0)
{
//type Your css here
}