简体   繁体   English

如何使用yeoman bower获得bootstrap响应式css工作

[英]How can I get bootstrap responsive css work with yeoman bower

I am using bower to get bootstrap lib, 我正在使用bower获取bootstrap lib,
there is a bootstrap-responsive-2.3.2 in the \\bower_components\\bootstrap-sass \\ bower_components \\ bootstrap-sass中有一个bootstrap-responsive-2.3.2
Although I can manually import it by myself, I just wanna find out is there any way to import it with bower command? 虽然我可以自己手动导入它,但我想知道有没有办法用bower命令导入它?

As far as I know bower fetches the specified dependencies. 据我所知,bower获取指定的依赖项。 You probably want to look into grunt tasks something like grunt-include-bootstrap that will define a task using grunt and will add to your project page. 您可能希望查看grunt任务,例如grunt-include-bootstrap ,它将使用grunt定义任务并将添加到您的项目页面。 I hope that helps. 我希望有所帮助。

In the main.scss file that ships with Yeoman (after running 'yo webapp' and using the default options), the '.container' max-width overrides the responsive defaults. 在Yeoman附带的main.scss文件中(在运行'yo webapp'并使用默认选项之后),'.container'max-width会覆盖响应默认值。 Simply take it out (lines 74-76), and the >1200px states will show. 只需将其取出(第74-76行),将显示> 1200px状态。

This is simply done by adding 这可以通过添加来完成

@import "bootstrap-sass/lib/responsive";

after

@import "bootstrap-sass/lib/bootstrap";

in your main.scss. 在你的main.scss中。 It is as easy as that :-) 就是这么简单 :-)

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

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