我在一个线程中找到了一种在引导程序中底部对齐网格元素的方法:
How do I bottom-align grid elements in bootstrap fluid layout
最后一个人说,我可以这样做,并链接到一个小提琴
链接到小提琴:http://jsfiddle.net/silb3r/0srp42pb/11/
我试过,但我无法弄清楚我做错了什么,这里是我的代码:
HTML:
<div class="row rowMidle">
<div class="col-md-3">
<div id="leftTown"><img src="images/TownLeft.png" height="100%" width="100%"></div>
</div>
<div class="col-md-1">
<div id="char1"><img src="images/char1.png" height="100%" width="100%"></div>
</div>
<div class="col-md-1">
<div id="char2"><img src="images/char2.png" height="70%" width="70%"></div>
</div>
<div class="col-md-1">
<div id="char3"> <img src="images/char3.png" height="80%" width="80%"></div>
</div>
<div class="col-md-3">
<div id="paneau"><img src="images/EditGetElement.png" height="100%" width="100%"></div>
</div>
<div class="col-md-3">
<div id="leftTown"><img src="images/towright.png" height="100%" width="100%"></div>
</div>
</div>
CSS:
.rowMidle > * {
float: none;
display: inline-block;
}
.rowMidle > *:last-child {
vertical-align: bottom;
}
您可以在线查看,自行查看问题: http://goldiman.alwaysdata.net/
谢谢 最好的祝福 Goldiman
答案 0 :(得分:0)
试试这个css:
.row.rowMidle {
margin-top: 500px;
}
.row.rowMidle > div > div {
vertical-align: bottom;
position: absolute;
bottom: 0;
}
从float:none;
.rowMidle > *