【发布时间】:2015-03-08 14:37:55
【问题描述】:
在动态生成的表中(即列数是可变的),并且在特定行上,我希望它跨越整行。
我没有计算使用的cols的数量,而是使用一些随机的大数作为colspan,有什么缺点吗?
<table class="table">
<thead>
<tr>
<th>#</th>
<th>col 1</th>
<th>col 2</th>
<th>col 3</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">no enough colspan</td>
</tr>
<tr>
<td colspan="9999"> should cover the whole row no matter the no. of col. </td>
</tr>
</tbody>
</table>
【问题讨论】:
-
如果你还是动态生成表,为什么只计算列数这么难?在我看来,这似乎是一种寻找问题的解决方案(更像是一种 hack),同时它本身可能会产生不必要的问题。
-
为什么用 twitter-bootstrap 和 twitter-bootstrap-3 标记?
标签: html css twitter-bootstrap twitter-bootstrap-3 html-table