我无法增加容器的最大宽度。如何改变源代码中的宽度?
我已经尝试更改 bootstrap-grid.css 页面中的宽度大小。
元素检查器允许我更改最大宽度。如何修改_grid.scss:6文件?
@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/