如何使用 Bootstrap 将按钮对齐到中心

2024-03-23

我使用 Bootstrap 创建了一个图块。在图块内部,靠近底部,我想要图块的三个按钮(开始、中间和结束)。

我制作了开始和结束按钮,但使用了两个div标签有pull-left and pull-right类。现在我想要的是放置中间按钮。

这是我的代码的一部分和屏幕截图:

<div class="col-lg-12">
    <div class="pull-left">
        <button class="btn btn-primary btn-sx" type="button">Confirm</button>
    </div>

    <!-- I want another button here, center to the tile-->

    <div class="pull-right">
        <button class="btn btn-primary btn-xs pull-right" type="button">Decline</button>
    </div>
</div>

使用此选项:

<div class="text-center">
    <button class="btn btn-primary btn-sx" type="button">
        Confirm
    </button>
</div>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何使用 Bootstrap 将按钮对齐到中心 的相关文章