使用bootstraps btn-group-justified layout时,是否可以使用不同宽度的按钮?

Jar*_*ple 3 css twitter-bootstrap

使用bootstraps btn-group-justified layout我有一组看起来像这样的按钮:

示例按钮布局

但我需要它看起来像这样:

示例按钮布局

是否有可能改变bootstraps合理的布局以适应这样的事情?

我知道我可以在不使用bootstraps对齐布局的情况下完成它,但我确实需要按钮组占据整个宽度并且与其他按钮组的宽度相同.

Dav*_*ain 6

btn-group-justified班有一个固定的表格布局这样一个子元素btn-group类的行为像表格单元格.你只需要改变它们的宽度.

@import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css');

body {
  margin-top: 10px;
}

.btn-group-justified > .btn-group:nth-of-type(odd) {
  width: .25%;
}
Run Code Online (Sandbox Code Playgroud)
<div class="container">
  <div class="row">
    <div class="col-md-12">
      <div class="btn-group btn-group-justified" role="group" aria-label="">
        <div class="btn-group" role="group">
          <button type="button" class="btn btn-danger"><span class="glyphicon glyphicon-minus-sign"></span></button>
        </div>
        <div class="btn-group" role="group">
          <button type="button" class="btn btn-default"><span class="badge">1</span> Bottle Mango</button>
        </div>
        <div class="btn-group" role="group">
          <button type="button" class="btn btn-danger"><span class="glyphicon glyphicon-minus-sign"></span></button>
        </div>
        <div class="btn-group" role="group">
          <button type="button" class="btn btn-default"><span class="badge">1</span> Bottle Junk</button>
        </div>
      </div>
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)