Alternating Row Colors in Bootstrap 3 - No Table

后端 未结 6 1972
天涯浪人
天涯浪人 2020-12-24 11:48

I am looking for a way to do alternating row colors in a responsive layout in Bootstrap 3. I cannot figure out how to do it without a LOT of extensive, confusing CSS and was

6条回答
  •  旧巷少年郎
    2020-12-24 12:45

    You can use this code :

    .row :nth-child(odd){
      background-color:red;
    }
    .row :nth-child(even){
      background-color:green;
    }
    

    Demo : http://codepen.io/mouhammed/pen/rblsC

提交回复
热议问题