我想设置类似于Twitter Bootstrap Customization Best Practices的样式,但我想使用响应式版本。我找到了这个帖子Twitter Bootstrap responsive css is not generated form the less files,但我不清楚如何设置bootstrap文件以便使用响应式版本进行自定义?
@import "theme-variables.less";
,并将主题文件添加到基本CSS块的末尾,使用@import "theme-css.less";
对我很有用。根据您正在自定义的内容,您可能需要稍微调整一下基本上就是这样。编辑您的自定义文件,编译bootstrap.less,并将生成的bootstrap css文件导入到您的项目中。
当然,在开始时,您需要保留好备份,以防出现问题,同样,在升级Bootstrap时也要这样做。
祝你好运!
首先,下载来自https://github.com/twbs/bootstrap的less版本。
如何使用Less和Less编译器,详见 http://lesscss.org/ http://winless.org/
Bootstrap教程详见 http://www.w3resource.com/twitter-bootstrap/tutorial.php