我想定义一个类以 4 角交替行,如何做到这一点?
HTML
<div class="scrollbars">
<div *ngFor="let path of Xyzpaths">
<div>{{path.xyz}}</div>
<div>{{path.salesItem}}</div>
<div>{{path.path1}}</div>
<div>{{path.path2}}</div>
</div>
</div>
CSS
.odd { background-color: #f2f9ff;}
.even { background-color: #eceff3; }