您的位置:首页 > Web前端 > BootStrap

BootStrap 怎样调整<td>的宽度

2016-11-14 17:27 190 查看
//对于 Bootstrap 3.0

For Bootstrap 3.0:

// class="col-md-*"  其中的*表示列的宽度

With twitter bootstrap 3 use:
class="col-md-*"
where * is a number of columns of width.

<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>


//对于 Bootstrap 2.0

For Bootstrap 2.0:

// class = "span*" 其中的*表示列的宽度

With twitter bootstrap 2 use:
class="span*"
where * is a number of columns of width.

<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> 元素,在 th 上设置同样有效。

** If you have
<th>
elements set the width there and not on the
<td>
elements.

没有亲自试过,不过觉的 Twitter  的工程师真是脑洞大开。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  bootstrap js javascript