【发布时间】:2018-05-24 15:19:29
【问题描述】:
我有一个应用程序,其设计要求从台式机到平板电脑,或从 xl 到 lg 分别设置 1280 个断点。但是,Bootstrap 本身在 1200 处有 xl 断点。
我需要为引导程序全局更改该 xl 断点。我是否必须从源文件重新编译 Bootstrap 4?
我尝试在我的 Sass 构建中设置它:
$grid-breakpoints: (
// Extra small screen / phone
xs: 0,
// Small screen / phone
sm: 576px,
// Medium screen / tablet
md: 768px,
// Large screen / desktop
lg: 992px,
// Extra large screen / wide desktop
xl: 1280px
);
$container-max-widths: (
sm: 540px,
md: 720px,
lg: 960px,
xl: 1220px
);
但是,全局 xl 的断点没有任何改变,它仍然会在 1200 像素宽处进行断点。
【问题讨论】:
-
注意:这里的大多数答案都使用了据称与 Bootstrap 不兼容的断点。有一些mathematical requirements。
标签: css twitter-bootstrap sass responsive-design bootstrap-4