我正在尝试在屏幕上垂直对齐文本。我已阅读the docs,了解如何执行此操作。但是我仍然没有运气。这是我的代码:
<div class="row">
<div class="col col-center text-center">
<h4 class="gray">This text is in the center of the screen</h4>
</div>
</div>
最佳答案
HTML
<div class="row">
<div class="col">
<div class="text-center">
<h5 style="text-align: center;">This text is in the center of the screen</h5>
</div>
</div>
</div>