在以下代码中:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading"><h2>Element Selection</h2></div>
<div class="panel-body">
<div class="row">
<div class="col-lg-5">
<div class="form-group">
<h3><span class="label label-info">Element Segment</span></h3>
<textarea class="form-control" rows="8"></textarea>
</div>
</div>
<div class="col-lg-2 text-center" >
<div class="btn-group-vertical">
<button type="button" class="btn btn-primary">>></button>
<button type="button" class="btn btn-primary"><<</button>
<button type="button" class="btn btn-primary">ALL>></button>
<button type="button" class="btn btn-primary"><< ALL</button>
</div>
</div>
<div class="col-lg-5">
<div class="form-group">
<h3><span class="label label-success">Element Segment</span></h3>
<textarea class="form-control" rows="8"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
&#13;
所以我可以将按钮组垂直放在中心位置。我搜索并尝试vertical-align: middle
,但它对我没用。