【发布时间】:2014-02-27 14:38:35
【问题描述】:
我正在尝试在 Bootstrap 3 alert 中垂直对齐文本(向左拉)和按钮(向右拉)。有点像这样:
+------------------------------------------------+
| Some text [A button] |
+------------------------------------------------+
到目前为止,我所拥有的是以下 (Bootply):
<div class="alert alert-info" style="overflow:hidden">
<p class="pull-left">Some text</p>
<button class="btn btn-sm btn-default pull-right">A button</button>
</div>
按钮完全对齐(这实际上是我的第一个问题,已解决here),但现在文本不在中心。
感谢您的帮助!
【问题讨论】:
-
你能为此设置一个小提琴吗?
-
@Travis 我已经包含了一个 bootply 的链接,你为什么需要一个小提琴?
-
哈哈我错过了那个对不起
标签: html css twitter-bootstrap