Css ile yap bence div:nth-child(2n+0) { background:red; } yaparsan mesela her 2. dive background:red verir.