gpt4 book ai didi

css - 删除列之间的间距

转载 作者:技术小花猫 更新时间:2023-10-29 10:06:34 26 4
gpt4 key购买 nike

我想删除 Bootstrap 网格中多列之间的空格。

我们如何覆盖 Bootstrap 的 CSS 来完成此任务或使用纯 CSS 的任何其他更好的解决方案?

ma​​in.html

<div class="row">
<div class="col-md-2">
// stuff here for this column
</div>
<div class="col-md-10">
// stuff here for columns
</div>
</div>

最佳答案

Bootstrap 5 中,no-gutters 类已更改为 g-0

Bootstrap 4 中,包含了 no-gutters 类。不需要额外的 CSS...

<div class="row no-gutters">
<div class="col-md-2">
// stuff here for this column
</div>
<div class="col-md-10">
// stuff here for columns
</div>
</div>

关于css - 删除列之间的间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40267056/

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