html – Bootstrap 3 – 行内的底部对齐列

前端之家收集整理的这篇文章主要介绍了html – Bootstrap 3 – 行内的底部对齐列前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我连续有两个Bootstrap列,因此:
<div class="row">
    <div class="col-xs-6 mainBox">
        <h1>Heading</h1>
        <h2>Sub Heading</h2>
    </div>
    <div class="col-xs-6 mainBox buttonBox">
        <button class="btn btn-primary">Button</button>
    </div>
</div>

我希望第二列在行内垂直对齐.我该如何实现这一目标?

这是一个演示小提琴:
http://jsfiddle.net/RationalGeek/6pYhx/

解决方法

尝试使用position:absolute;并设置0的底部
.row {
    position: relative;
}
.mainBox {
    border: solid thin black;
}    
.buttonBox {
    position: absolute;
    bottom:0;
    right:0;
}

http://jsfiddle.net/6pYhx/3/

原文链接:https://www.f2er.com/html/226976.html

猜你在找的HTML相关文章