我可以使用什么引导容器让我将文本置于中心位置?
我试图让文字居中,我认为这与我选错了容器有关吗?
<!-- Intro Section -->
<section id="intro" class="intro-section">
<div class="container">
<div class="row">
<div class="col-lg-12 text-justified">
<p class="main1">Welcome to my digital portfolio</p>
<p>My name is Liam Docherty</p>
<p>I'm a web developer from London.</p>
</div>
</div>
</div>
</section>
答案 0 :(得分:1)
Bootstrap 4中有一个单独的类:
.text-center {
text-align: center !important;
}
HTML:
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2>Titel</h2>
</div>
</div>
</div>