对于引导 4.0:
在 Bootstrap 4.0.0 中,您不能col-*
可靠地使用这些类(在 Firefox 中有效,但在 Chrome 中无效)。您需要使用OhadR 的答案:
<tr>
<th style="width: 16.66%">Col 1</th>
<th style="width: 25%">Col 2</th>
<th style="width: 50%">Col 4</th>
<th style="width: 8.33%">Col 5</th>
</tr>
对于引导 3.0:
使用 twitter bootstrap 3 使用:class="col-md-*"
其中 * 是宽度的列数。
<tr class="something">
<td class="col-md-2">A</td>
<td class="col-md-3">B</td>
<td class="col-md-6">C</td>
<td class="col-md-1">D</td>
</tr>
对于引导 2.0:
使用 twitter bootstrap 2 使用:class="span*"
其中 * 是宽度的列数。
<tr class="something">
<td class="span2">A</td>
<td class="span3">B</td>
<td class="span6">C</td>
<td class="span1">D</td>
</tr>
** 如果您有<th>
元素设置宽度,而不是<td>
元素。