你好谢谢你看我的问题,
我正在努力将此链接置于 Bootstrap 中的模态中心。我没有使用网格系统或行。模态中有一个 BS 轮播,我可以使用 margin:0 auto;
这是链接位置的可视化,它顽固地停留在模式的左侧。
链接应该在轮播指示器的正下方。
HTML 片段:
.
.
.
<div>
<ol>
<li> data-slide-to="1"></li>
<li data-target="#home-price-guide-carousel" data-slide-to="2"></li>
</ol>
</div>
<a class="btn-center" href="#">Continue</a>
<div class="modal-footer">
</div>
.
.
.
相关 CSS:
.btn - center {
color: #95d63b;
margin:0 auto;
float:none;
}
基本上,我如何让 btn-center
真正居中。
最佳答案
2个选项:
text-align:center;
.btn-center{ 颜色:#95d63b; position:absolute; 变换:翻译(-50%,-50%); 左:50%; }
可以试试here
关于html - 如何在 Bootstrap 中将此 <a> 标记置于此模式的中心?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35689429/