【发布时间】:2018-09-30 02:21:52
【问题描述】:
<div class="table-responsive">
<table class="table">
<thead>
Head
</thead>
<tbody>
<tr>
<td>
<div class="row">
<div class="col-lg-6">Item 1.0</div>
<div class="col-lg-6">Item 1.1</div>
</div>
</td>
<td>
<div class="row">
<div class="col-lg-6">Item 2.0</div>
<div class="col-lg-6">Item 2.1</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
此代码创建一个表,其中所有项目都在同一行中。我搜索了css 文件,但没有定义inline 或inline-block,所以我猜这是正常的引导行为。我想要实现的是一个接一个地显示前缀为1的项目,而前缀为2的项目也是如此,但我希望它们都在同一行。我曾尝试将<ul> 与<li> 元素一起使用,但由于某种原因它们也显示在同一行中。
我的表应该只包含两列和一个标题。这就是我现在得到的:
【问题讨论】:
-
年份广告无效。你缺少 tr 和 th/td 的
-
是的,你是对的,但这不是我的问题
标签: css twitter-bootstrap twitter-bootstrap-3