我在Twitter Bootstrap 3中使用img vertical align时遇到了一些问题。所以,这是HTML:
<div class="container center-block">
<div class="row slider">
<div class="col-md-1 left-arrow"><img src="img/left-arrow.png"/></div>
<div class="col-md-2 brand"><img src="img/brand.png"/></div>
<div class="col-md-2 brand"><img src="img/brand.png"/></div>
<div class="col-md-2 brand"><img src="img/brand.png"/></div>
<div class="col-md-2 brand"><img src="img/brand.png"/></div>
<div class="col-md-2 brand"><img src="img/brand.png"/></div>
<div class="col-md-1 right-arrow"><img src="img/right-arrow.png"/></div>
</div>
</div>
如何在.left-arrow
和.right-arrow
div中垂直居中图像?感谢
答案 0 :(得分:0)
检查此css
.container .row { float:left; width:100%; }
.container div { float:left; }
.left-arrow { margin-right:10px; }
.right-arrow { margin-left:10px; }