Twitter bootstrap 在站点上使用多个引导槽宽度

Twitter bootstrap 在站点上使用多个引导槽宽度,twitter-bootstrap,twitter-bootstrap-3,Twitter Bootstrap,Twitter Bootstrap 3,我使用的是Bootstrap3网格系统,它的设计在页面的不同部分使用多个网格槽宽度 查看示例主题,它们似乎都在整个页面上使用了一个边距宽度 例如,引导的默认下载为您提供以下css: @media (min-width: 1200px) .container { width: 1140px; } .row { margin-right: -15px; margin-left: -15px; } .......col-md-12, .col-lg-12 { position: relativ

我使用的是Bootstrap3网格系统,它的设计在页面的不同部分使用多个网格槽宽度

查看示例主题,它们似乎都在整个页面上使用了一个边距宽度

例如,引导的默认下载为您提供以下css:

@media (min-width: 1200px)
.container {
width: 1140px;
}

.row {
margin-right: -15px;
margin-left: -15px;
}

.......col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
}
因此,每列之间的默认值为30px,最大列宽为65px(填充其95pc的宽度)

如果我不想要排水沟,我会得到以下结果

@media (min-width: 1200px)
.container {
width: 1140px;
}

.row {
margin-left: 0px;
margin-right: 0px;
}

....col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 0px;
padding-right: 0px;
}
因此,每列之间的默认值为30px,最大列宽为95px


对于不同的部分,将具有多个页边距宽度的页面组合在一起的标准方式是什么?可以这样做吗?

是的,只需为页面分配一个新类,并根据需要调整列填充

body.alt-gutter[class^='col-'], body.alt-gutter[class*=' col-'] {
  padding-left: 5px; // or whatever you need
  padding-right: 5px;
}