我希望我的表格能够交替显示颜色。但是,在应用了“table-striped”类之后,所有行都变成了灰色。我尝试加载v3和v4两个Bootstrap CSS文件,但仍然无效。
HTML
<table id="maxDiversificationTable" class="investmentTable table table-striped table-bordered table-hover table-fit" style="margin-top:-55%" >
<thead>
<tr style="color:#337AC7" >
<th >Tickers</th>
<th >Current Weight</th>
<th >New Weight</th>
<th >Conviction</th>
</tr>
</thead>
{% for tableData in dataSet %}
<tbody>
<tr>
<td>{{tableData.tickers}}</td>
<td>{{tableData.currentWeight}}</td>
<td>{{tableData.newWeight}}</td>
<td>{{tableData.conviction}}</td>
</tr>
</tbody>
{% endfor %}
</table>