将 2 个按钮放在右下角 bootstrap

Position 2 buttons bottom right with bootstrap

我想在一个区域内右下角放置 2 个按钮。 (yes/no)。

position: absolute; bottom: 0px;

会把他们压下去。 不幸的是,当我使用绝对定位时,右拉功能失效了,我想它们是不兼容的。

如何使用 bootstrap 将 2 个按钮放置在区域内的右下角?

<div>
    Hello, here is the question
</div>
<div style ="position: absolute; bottom: 0;">
    <a class="btn btn-primary pull-right" href="#">Yes</a>
    <a class="btn btn-primary pull-right" href="#">No</a>
</div>

你需要right:0;

<div>
    Hello, here is the question
</div>
<div style ="position: absolute; bottom: 0;right:0;">
    <a class="btn btn-primary" href="#">Yes</a>
    <a class="btn btn-primary" href="#">No</a>
</div>

Bootply

如果您使用的是 position:absolute,则可以使用此代替 float:right;

right:0px;