gpt4 book ai didi

html - Bootstrap 没有排水沟

转载 作者:太空宇宙 更新时间:2023-11-04 12:10:53 25 4
gpt4 key购买 nike

我可以使用没有装订线的 Bootstrap 网格吗?我想要 3 列一行 http://prntscr.com/6gpmhm我已经发布了关于 css 的标记我正在使用框架的默认 css

<section class="team-block">
<div class="row">
<div class="col-sm-4">
<img src="images/photo-01.jpg" height="534" width="534" alt="image description">
</div>
<div class="col-sm-4">
<img src="images/photo-02.jpg" height="267" width="266" alt="image description">
<img src="images/photo-10.jpg" height="267" width="266" alt="image description">
<img src="images/photo-03.jpg" height="267" width="266" alt="image description">
<img src="images/photo-04.jpg" height="267" width="266" alt="image description">
</div>
<div class="col-sm-4">
<img src="images/photo-05.jpg" height="534" width="534" alt="image description">
</div>
</div>
</section>

最佳答案

为了使图像堆叠在一列上,您需要删除 px 宽度并重新定义行,如下所示:

<div class="col-sm-4">
<div class="row">
<div class="col-sm-6">
<img src="images/photo-02.jpg" class="img-responsive" alt="image description">
</div>
<div class="col-sm-6">
<img src="images/photo-10.jpg" class="img-responsive" alt="image description">
</div>
</div>
<div class="row">
<div class="col-sm-6">
<img src="images/photo-03.jpg" class="img-responsive" alt="image description">
</div>
<div class="col-sm-6">
<img src="images/photo-04.jpg" class="img-responsive" alt="image description">
</div>
</div>
</div>

您可以将此添加到您的 css 中以移除装订线:

.col-sm-4    {
padding: 0px;
}
.col-sm-6 {
padding: 0px;
}

关于html - Bootstrap 没有排水沟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29051967/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com