将img与Bootstrap 3中的Jumbotron底部对齐

时间:2015-05-22 13:40:48

标签: html css twitter-bootstrap

使用Bootstrap 3和示例模板中的Jumbotron,我有:

<div class="jumbotron" style="margin-bottom:0px; background:url('/img/bgimg.jpg') white no-repeat; min-height:450px;">
    <div class="container">
        <img src="img/logo.png" class="img-responsive center-block" style="opacity:0.8;">
    </div>
</div>

我希望将内部图像(logo.png)拉到Jumbotron的底部。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

使用css位置,如下所示:

<div class="jumbotron" style="margin-bottom:0px; background:url('/img/bgimg.jpg') white no-repeat; min-height:450px; position: relative;">
    <div class="container">
        <img src="img/logo.png" class="img-responsive center-block" style="opacity:0.8; position: absolute; bottom: 0;">
    </div>
</div>