【问题标题】:How to increase the max-width of the container with bootstrap4?如何使用 bootstrap4 增加容器的最大宽度?
【发布时间】:2019-10-23 11:53:35
【问题描述】:

我无法增加容器的最大宽度。如何在源码中改变宽度?

我已经尝试在 bootstrap-grid.css 页面中更改宽度的大小。

元素检查器允许我更改最大宽度。如何修改_grid.scss:6文件?

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

【问题讨论】:

    标签: css sass bootstrap-4 width


    【解决方案1】:

    浏览器正在显示 SASS 地图。如果您只想使用 CSS,请覆盖每个容器断点...

    @media (min-width: 576px) {
      .container {
        max-width: ??px;
      }
    }
    
    @media (min-width: 768px) {
      .container {
        max-width: ??px;
      }
    }
    
    @media (min-width: 992px) {
      .container {
        max-width: ??px;
      }
    }
    
    @media (min-width: 1200px) {
      .container {
        max-width: ??px;
      }
    }
    

    CSS 演示:https://www.codeply.com/go/zTBLpNsTDi
    SASS 演示:https://www.codeply.com/go/5D8PrphU4b


    另见:Set Bootstrap container class to 940px max

    或者,使用 SASSBootstrap 4 min width fluid container (change responsive behavior)

    【讨论】:

      猜你喜欢
      • 2016-11-23
      • 1970-01-01
      • 1970-01-01
      • 2020-01-24
      • 1970-01-01
      • 1970-01-01
      • 2013-04-11
      • 2020-08-15
      • 1970-01-01
      相关资源
      最近更新 更多