在Bootstrap 3中可以并列显示两个表格?
每个都尝试制作每个col-md-6,尽管它缩小了宽度,但它们不会彼此相邻缠绕(而是在全宽视图中一个在另一个顶部).
@H_403_4@<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包裹:
@H_403_4@<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