我有一個圓形按鈕,需要在其中心有一個加號圖像。事情是,我似乎無法垂直對齊該圖像,而不訴諸邊際。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