加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – Bootstrap中的两个并排表

发布时间:2020-12-18 00:25:57 所属栏目:安全 来源:网络整理
导读:在Bootstrap 3中可以并列显示两个表格? 每个都尝试制作每个col-md-6,尽管它缩小了宽度,但它们不会彼此相邻缠绕(而是在全宽视图中一个在另一个顶部). div class="table-responsive" table class="table table-striped" thead tr th class="col-md-1"#/th th
在Bootstrap 3中可以并列显示两个表格?

每个都尝试制作每个col-md-6,尽管它缩小了宽度,但它们不会彼此相邻缠绕(而是在全宽视图中一个在另一个顶部).

<div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th class="col-md-1">#</th>
                  <th class="col-md-2">Header</th>
                  <th class="col-md-3">Header</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td class="col-md-1">1,001</td>
                  <td class="col-md-2">1,001</td>
                  <td class="col-md-3">1,001</td>
                </tr>
                <tr>
                  <td class="col-md-1">1,001</td>
                </tr>
                 <tr>
                  <td class="col-md-1">1,001</td>
                </tr>
              </tbody>
            </table>
          </div>
          <h2 class="sub-header">Latest Incidents</h2>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th class="col-md-1">#</th>
                  <th class="col-md-2">Header</th>
                  <th class="col-md-3">Header</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td class="col-md-1">1,001</td>
                </tr>
              </tbody>
            </table>

解决方法

您需要将每个表包含在col-6 div中,而不是将col-6应用于表本身.这是您的代码与col-xs-6包裹:
<div class="col-xs-6">
  <h2 class="sub-header">Subtitle</h2>
  <div class="table-responsive">
    <table class="table table-striped">...

在这里它是在行动:http://www.bootply.com/lbrQZF3152

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读