我正在使用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因为我试了一下,当使用'绝对'时,所有东西都不会再组织起来 –