【发布时间】:2022-01-27 20:27:29
【问题描述】:
我正在使用 Bootstrap css 库。 我知道如何用这个库制作条纹表,但是如何制作条纹 div?
例如,在表格中你会这样做:
<table id="newtable" class="table table-bordered table-striped fixedtable">
<thead>
<th>Date</th>
<th>Info</th>
<th>Price</th>
</thead>
<tbody>
<tr>
<td colspan="3">
<div>text 1</div>
<div>text 2</div>
<div>text 3</div>
<div>text 4</div>
</td>
</tr>
</tbody>
</table>
我需要用这样的 div 重复“样式”:
<div class="row"><div class="col">Text 1 White BG</div></div>
<div class="row"><div class="col">Text 2 Grey BG</div></div>
<div class="row"><div class="col">Text 3 White BG</div></div>
<div class="row"><div class="col">Text 4 Grey BG</div></div>
问题是:如何制作:<div>text 1</div>, <div>text 2</div>, <div>text 3</div>, <div>text 4</div>striped?
【问题讨论】:
标签: html css twitter-bootstrap