我在两个图像之间有一个按钮,我想将按钮居中到图像高度。有人可以帮帮我吗?
<div class="row row-centered">
<div class="col-xs-4 imgwifi">
<img src="imagenes/example1.png" class="img-responsive center-block imgwifi" alt="Cinque Terre">
</div>
<div class="col-xs-4 boton pagination-centered">
<button type="submit" class="btn btn-primary btn-lg btn-block" onClick="CheckLoginCode()">Entrar</button>
</div>
<div class="col-xs-4 imgvm">
<img src="imagenes/example2.jpg" class="img-responsive center-block imgvm" alt="Cinque Terre">
</div>
</div>
</div>
答案 0 :(得分:0)
通过&#34;将按钮居中到图像高度&#34;我认为你的意思是你希望垂直居中?如果是这样,您可以使用此CSS:
.boton {
position: relative;
top: 50%;
transform: translateY(-50%);
}