gpt4 book ai didi

twitter-bootstrap - 当小于 12 col 时将多个 Bootstrap 列居中

转载 作者:行者123 更新时间:2023-12-03 23:39:39 24 4
gpt4 key购买 nike

<div class="row">
<div ng-repeat="tile in tiles" class="col-md-3"></div>
</div>

如何确保这些 Bootstrap 列始终居中,即使只有 2 个?

最佳答案

添加 row-center到行和 col-center 的类以这种方式到 col-md-3 :

<div class="row row-center">
<div ng-repeat="tile in tiles" class="col-md-3 col-center"></div>
</div>

.row-center {
text-align:center;
}

.col-center {
display:inline-block;
float:none;
}

Bootply Demo

关于twitter-bootstrap - 当小于 12 col 时将多个 Bootstrap 列居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30315966/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com