我正在使用引導程序並嘗試垂直對齊列中的按鈕。列中間的垂直對齊按鈕 - 引導程序
注意:我無法使用flex,也無法根據標準定義高度。
如果我使用邊距,它將無法在平板電腦和移動設備上使用。所以下面
是我的代碼:
.col-xs-2, .col-xs-6 {
display: inline-block;
}
.col-xs-2 {
vertical-align: middle;
}
<div class="container">
<div class="row">
<div class="col-xs-4">
<h4>Some really large label that will wrap to multiple lines in small screens</h4>
</div>
<div class="col-xs-6">
<h4>Some really large label that will wrap to multiple lines in small screens</h4>
</div>
<div class="col-xs-2">
<button class="btn" style="color: #660066;"> <i class="fa fa-arrow-left" data-ng-click="onClickBack()"></i>
</button>
</div><!--
-->
</div>
</div>
所以我的問題是如何使箭頭按鈕對齊到該行的中間。
我試過了:display:table-cell
和display: inline-block;
似乎沒什麼可行的。我錯過了什麼嗎?
恐怕這是一個有點難以理解你想要什麼。你可以上傳一張圖片展示你想要的東西嗎? –
行中間的箭頭按鈕按鈕。 – user2936008
下一行中與第二個文本元素位於同一行的哪一行?另外,如果你的意思是在中間的「左 - 右」,即「水平」,而不是「垂直」。我想也許你是在橫向集中之後。 –