Bootstrap表,包含2行和多个不同宽度的列

时间:2017-10-16 08:01:35

标签: twitter-bootstrap

我想创建一个类似下面示例的引导表:

-----------------
|       |       |
-----------------
|   |   |   |   |
-----------------

我怎样才能轻松实现这一目标? 我无法在互联网上找到任何相关信息,而且我是一名有助推器的初学者。

1 个答案:

答案 0 :(得分:2)

这是你在寻找什么?我建议你看看Grid System



.row{
  margin-top: 10px;
  border-top: 2px dashed black;
  border-bottom: 2px dashed black;
}

.col-md-6{
  height: 20px;
  border-right : 2px solid black;
  border-left : 2px solid black;
  margin: 10px 0 10px 0;
}
.col-md-3{
  height: 20px;
  border-right : 2px solid black;
  border-left : 2px solid black;
  margin: 10px 0 10px 0;
}

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<div class="container-fluid">
<div class="row">
  <div class="col-xs-6 col-md-6"></div>
  <div class="col-xs-6 col-md-6"></div>
</div>
<div class="row">
  <div class="col-xs-3 col-md-3"></div>
  <div class="col-xs-3 col-md-3"></div>
  <div class="col-xs-3 col-md-3"></div>
  <div class="col-xs-3 col-md-3"></div>
</div>
<div>
&#13;
&#13;
&#13;