目前我在一页中有Bootstrap网格,如下图所示。
我想要如下图所示的网格带红色指示灯
Wanted my Bootstrap Grid Like This
码
<div class="row">
<div class="col-md-6">
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 10px;" action="#" class="form-horizontal" method="post" enctype="multipart/form-data">
<label>My label</label>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="file" name="import_file"/> <br>
<button class="btn btn-primary">Import File</button>
</form>
</div>
<div class="col-md-6">
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 10px;" action="#" class="form-horizontal" method="post" enctype="multipart/form-data">
<label>My label</label>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="file" name="import_file"/> <br>
<button class="btn btn-primary">Import File</button>
</form>
</div>
<div class="col-md-6">
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 10px;" action="#" class="form-horizontal" method="post" enctype="multipart/form-data">
<label>My label</label>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="file" name="import_file"/> <br>
<button class="btn btn-primary">Import File</button>
</form>
</div>
<div class="col-md-6">
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 10px;" action="#" class="form-horizontal" method="post" enctype="multipart/form-data">
<label>My label</label>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="file" name="import_file"/> <br>
<button class="btn btn-primary">Import File</button>
</form>
</div>
</div>
答案 0 :(得分:0)
在上一个col上添加一些偏移量,例如:
<div class="col-md-6 col-md-offset-3">
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 10px;" action="#" class="form-horizontal" method="post" enctype="multipart/form-data">
<label>My label</label>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="file" name="import_file"/> <br>
<button class="btn btn-primary">Import File</button>
</form>
</div>