繁体   English   中英

如何在Bootstrap 4 Rails Gem中启用Flexbox

[英]How to enable flexbox in bootstrap 4 rails gem

我启动了一个rails项目,并将bootstrap gem添加到Gemfile中。 现在我想启用flexbox,根据bootstrap 4 文档,它是通过编辑_variable.scss $enable-flex: true

我在global.scss添加了$enable-flex: true ,并将此文件添加到了application.scss 但这不起作用。

添加$enable-flex: true; application.scss @import "bootstrap";之前 @import "bootstrap";

有用:

application.scss

$enable-flex: true;
// Custom bootstrap variables must be set or imported before bootstrap itself.
@import "bootstrap";

看看这个问题。

它在_bootstrap-flex.scss文件中提到此修补程序是一个简单的变量设置

$enable-flex: true;

@import "bootstrap";

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM