我正在使用Bootstrap 4的card groups。我想將兩個按鈕對齊在.card的底部。在底部對齊兩個按鈕
的jsfiddle。
我試圖
.card {
position: relative;
}
.btn {
position: relative; // <- if I use absolute here, it will be ugly
bottom: 0;
}
也
.card {
display: table;
}
.btn {
display: table-cell;
vertical-align: bottom;
}
但無論是作品。
爲什麼你認爲絕對定位將是難看..? –
@Nareshsadu因爲我試了一下,當使用'絕對'時,所有東西都不會再組織起來 –