如何解决如何在同一个 div 中的两个按钮之间留出空间??
把它们放在里面btn-toolbar
或其他容器里,不要btn-group
。btn-group
将它们连接在一起。有关
Bootstrap文档的更多信息。
编辑:最初的问题是针对 Bootstrap 2.x 的,但对于Bootstrap
3和Bootstrap
4仍然有效。
在Bootstrap 4中,您需要使用实用程序类(例如 mx-2)为您的组添加适当的边距。
解决方法
水平间隔 Bootstrap 按钮的最佳方法是什么?
目前按钮正在触摸:
<div class="btn-group">
<button class="btn btn-inverse dropdown-toggle" data-toggle="dropdown">
<i class="icon-in-button"></i>
Add to list
<span class="caret"/>
</button>
<ul class="dropdown-menu">
<li>
<a href="#">here</a>
</li>
<li>
<a href="#">new</a>
</li>
</ul>
<button class="btn btn-info">
<i class="icon-in-button"></i>
more
</button>
</div>
jsfiddle显示问题:http:
//jsfiddle.net/hhimanshu/sYLRq/4/
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。