Bootstrap 4 Flex Box Grid

Bootstrap 4 Flex Box Grid

根据 this post,Bootstrap 4 提供了一个可选的弹性框网格。

There’s a boolean variable in the _variables.scss file called $enable-flex. If you set this to true and recompile, a ton of things happen.

问:如何重新编译Bootstrap?我输入了:

git clone https://github.com/twbs/bootstrap

在命令行上,我的 windows 计算机刚刚挂起。我终于不得不按 Ctrl+C 退出。

要编译 scss 文件,您需要 SASS 编译器: http://sass-lang.com/

您可以找到 linux 和 windows 的版本。

看起来scotch.io有一个flex box编译版本。

bootstrap-flex 导入您的 SASS 编译器,该编译器还设置 $enable-flex:true

Demo here

更新: 从 Bootstrap 4 Alpha 6 开始,flexbox 现在是默认设置。 http://www.codeply.com/go/p/bootstrap_4.0.alpha.6 http://www.codeply.com/go/p/bootstrap_4.0.0