我有一个圆形按钮,需要在其中心有一个加号图像。事情是,我似乎无法垂直对齐该图像,而不诉诸边际。Bootstrap 4:在圆形按钮中垂直对齐图像
有没有更简单的Bootstrap-y方法来做到这一点?
这里是我的代码:
.btn-circle {
background-color: blue;
height: 60px;
width: 60px;
border-radius: 50%;
}
/* the button is supposed to be a circle, but for some reason it's not showing up like that in this snippet */
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<a class="btn btn-circle mr-3" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample"><img src="https://res.cloudinary.com/dt9b7pad3/image/upload/v1499509391/58a2031e6af142ce619ba2a2_plus-symbol_y6vqca.svg" height="20"></a>
这就是它!谢谢,Zim! – Retros