Bootstrap 4 左、中、右对齐按钮

Bootstrap 4 左、中、右对齐按钮,bootstrap-4,Bootstrap 4,我使用的是Bootstrap4Beta。我希望工作流导航部分中的按钮与左侧的“后退”按钮、居中的两个“取消”按钮和右侧的“下一步”按钮对齐 我是这样编码的: <button type="button" class="btn btn-secondary float-left">Back</button> <div class="text-center"> <button type="button" class="btn btn-danger

我使用的是Bootstrap4Beta。我希望工作流导航部分中的按钮与左侧的“后退”按钮、居中的两个“取消”按钮和右侧的“下一步”按钮对齐

我是这样编码的:

  <button type="button" class="btn btn-secondary float-left">Back</button>
  <div class="text-center">
    <button type="button" class="btn btn-danger">Cancel</button>
    <button type="button" class="btn btn-secondary"">Save and Exit</button>
  </div>
  <button type="submit" class="btn btn-primary float-right">Next</button>
返回
取消

使用flex代替float:

<div class="d-flex justify-content-between">
  <button type="button" class="btn btn-secondary">Back</button>
  <div>
    <button type="button" class="btn btn-danger">Cancel</button>
    <button type="button" class="btn btn-secondary">Save and Exit</button>
  </div>
  <button type="submit" class="btn btn-primary">Next</button>
</div>

返回
取消
保存并退出
下一个

使用flex而不是float:

<div class="d-flex justify-content-between">
  <button type="button" class="btn btn-secondary">Back</button>
  <div>
    <button type="button" class="btn btn-danger">Cancel</button>
    <button type="button" class="btn btn-secondary">Save and Exit</button>
  </div>
  <button type="submit" class="btn btn-primary">Next</button>
</div>

返回
取消
保存并退出
下一个