只需添加
<div class="text-center">Center aligned text.</div>
在所有这些列之前
<div class="row">
<div class="text-center">Center aligned text.</div>
<div class="col-md-3" style="background-color:yellow">123</div>
<div class="col-md-3" style="background-color:green">456</div>
<div class="col-md-3" style="background-color:red">789</div>
<div class="col-md-3" style="background-color:grey">000</div>
</div>
但是,如果您希望某些内容只占用一定数量的列,那么您需要另一行并像这样偏移
<div class="row">
<div class="col-md-offset-3 col-md-6">
<div class="text-center">Center aligned text.</div>
</div>
</div>
<div class="row">
<div class="col-md-3" style="background-color:yellow">123</div>
<div class="col-md-3" style="background-color:green">456</div>
<div class="col-md-3" style="background-color:red">789</div>
<div class="col-md-3" style="background-color:grey">000</div>
</div>
编辑:如果您希望该文本从字面上跨越/浮动在这两个跨度上,那么您将需要类似“Shawn Taylor”建议的内容
<div class="row">
<div class="col-md-3" style="background-color:yellow">123</div>
<div class="col-md-6" style="position:relative;">
<div style="position: absolute; z-index: 2; left: 0; top: 0; width: 100%;" class="text-center">Center aligned text.</div>
<div class="row">
<div class="col-md-6" style="background-color:green">456</div>
<div class="col-md-6" style="background-color:red">789</div>
</div>
</div>
<div class="col-md-3" style="background-color:grey">000</div>
</div>