我目前正在 SCSS 中开发 Bootstrap4。
我只想更改智能手机上的内部 $grid-gutter-width 。
根据_grid.scss$grid-columns: 12 !default;
$grid-gutter-width: 30px !default;
在 Bootstrap 站点上,据说:
Updated grid sizes, mixins, and variables. Grid gutters now have a Sass map so you can specify specific gutter widths at each breakpoint.
我找不到 map 以及如何完成。
最佳答案
这看起来像是文档中的错误。曾经有一张 map ,但是it was removed在 4.0.0 发布之前。但是,只需添加 xs
就相当容易了。与 SASS。例如移动设备上的 5px...
@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, sm)){
.row > .col,
.row > [class*="col-"] {
padding-right: 5px;
padding-left: 5px;
}
}
https://www.codeply.com/go/XgynFzTmGv
关于twitter-bootstrap - 在 Bootstrap 4 中,如何根据断点更改内部 $grid-gutter-width?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49302891/