css - 如何使用 bootstrap4 增加容器的最大宽度?

标签 css sass bootstrap-4 width

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

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

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

What I want to change

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

最佳答案

浏览器正在显示 SASS map 。如果您只想使用 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

或者,使用 SASS:Bootstrap 4 min width fluid container (change responsive behavior)

关于css - 如何使用 bootstrap4 增加容器的最大宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58522286/

相关文章:

JavaFX 在 ImageView 中显示像素的 RGB 值

html - 响应式 Div 中图像上的中心按钮

jquery - 同位素滤光片仅显示滤光画廊图像

javascript - 如何在 JS 中向 var 字符串添加链接或颜色更改?

css - 将 calc() 与 $variables 一起使用时的意外术语

django - 将 SASS/SCSS 与 Django 集成

compass-sass - 在 Sass 中包含使用变量作为名称的 mixins

angular - 如何使用 Angular 2/Bootstrap 4 为 ng-bootstrap 控件自定义 CSS

css - 如何使用 css 在 Font Awesome 图标中创建不同 Angular 边框?

css - 如何使 Bootstrap Navigation 和 Carousel 以 100vh 配合在一起?