我正在使用Bootstrap。我怎样才能使三个列都相同的高度包括差距?这里是截图;
Screenshot
下面是代码;
<div class="container">
<div class="row mt-4">
<div class="col-12 col-md-6 col-xl-4 service mt-4">
<div class="p-3">
<div class="icon">
<i class="fa-solid fa-laptop-code fs-1"></i>
</div>
<h5 class="mb-4 mt-2">Web Development</h5>
<p>I provide full Web Development according to your needs.</p>
</div>
</div>
<div class="col-12 col-md-6 col-xl-4 service mt-4">
<div class="p-3">
<div class="icon">
<i class="fa-solid fa-palette fs-1"></i>
</div>
<h5 class="mb-4 mt-2">Web Design</h5>
<p>I will do the best and most Modern Web App Designs for your website.</p>
</div>
</div>
<div class="col-12 col-md-6 col-xl-4 service mt-4">
<div class="p-3">
<div class="icon">
<i class="fa-solid fa-mobile-screen-button fs-1"></i>
</div>
<h5 class="mb-4 mt-2">Responsive Design</h5>
<p>Fully Responsive Design using Bootstrap or Media Queries.</p>
</div>
</div>
</div>
</div>
下面是一些CSS;
.p-3{
text-align: center;
background: #202020;
border-radius: 10px;
}
3条答案
按热度按时间wf82jlnq1#
将
height: 100%
添加到类p-3
将解决该问题。如下所示编辑CSS;
lnlaulya2#
试试这个
i86rm4rw3#
超文本标记语言
CSS