我有下面的div,并希望两个按钮对齐到中心。现在按钮是靠左对齐的。我添加了"justify-content-center“,但仍然没有居中。我正在使用bootstrap 5
<div class="col-8 offset-2 col-lg-9 col-xl-6 offset-xl-3">
<div class="row">
<h1 class="mt-5">What is this all about. What is this all about. What is this all abour?</h1>
</div>
<div class="row mt-5 justify-content-center">
<div class="col">
<button type="button" class="btn btn-primary m-2">Yes Please</button>
<button type="button" class="btn btn-primary">No Please</button>
</div>
</div>
</div>我做错什么了?
发布于 2021-09-01 17:41:12
将"justify-content-center“替换为"text-center”。
https://stackoverflow.com/questions/69018334
复制相似问题