Twitter bootstrap 尝试在周围使用内容正当化,但内容不会传播出去

Twitter bootstrap 尝试在周围使用内容正当化,但内容不会传播出去,twitter-bootstrap,bootstrap-4,Twitter Bootstrap,Bootstrap 4,我试图像引导文档中所示均匀地分布一些跨距,但它并没有将跨距分布出去。尝试使用文档中类似的内容来证明内容的合理性。我错过了什么?非常感谢。我的完整代码可以看到 HTML {{tab.label} 您将flex属性应用于不正确的div元素。试试这个: <div class="section-header" style="padding: 5px; background-color: #7C9DB9"> <div class="

我试图像引导文档中所示均匀地分布一些跨距,但它并没有将跨距分布出去。尝试使用文档中类似的内容来证明内容的合理性。我错过了什么?非常感谢。我的完整代码可以看到

HTML


{{tab.label}

您将flex属性应用于不正确的
div
元素。试试这个:

<div class="section-header" style="padding: 5px; background-color: #7C9DB9">
  <div class="d-flex justify-content-around">
    <div class="header-span" ng-repeat="tab in tabs" ng-click="update($index, tab.value)" ng-class="{'span-active': tab.active}">
      {{tab.label}}
    </div>
  </div>
</div>

{{tab.label}
我也使用了
div
而不是
span
。还可以组合前两个div元素以减轻DOM的负担

<div class="section-header" style="padding: 5px; background-color: #7C9DB9">
  <div class="d-flex justify-content-around">
    <div class="header-span" ng-repeat="tab in tabs" ng-click="update($index, tab.value)" ng-class="{'span-active': tab.active}">
      {{tab.label}}
    </div>
  </div>
</div>