sass+compass+bootstrap三剑合璧高效开发记录_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:43:02
Original
1320 people have browsed it

1. 先搭建环境,下载node.js,rubyinstaller,安装, 安装rubyinstaller时,要选上include system path,这样就会自动将node.js执行添加到windows系统环境变量,免去手动创建烦恼.node.js就点下一步安装就行了

2. win+R cmd 再运行  gem install bootstrap-sass

3.创建一个项目 cd 进入到你所在的项目存放目录,命令行窗口运行 compass creat XXXXX(项目名称)这样就创建了一个项目会生成如下所示目录

4.右键打开 config.rb  在require 'compass/import-once/activate' 下面加一行 require 'bootstrap-sass'

5.打开sass 目录下的 { @import "compass/reset"; } 这个注释或删掉都行,再添加一行 @import "bootstrap";

6.在刚才的命令窗口处compass compile 编译下.这样就可以在 sass 目录下操作你想要操作 .scss 了,然后就compass compile , 当然了,如果你不想老是输入compass compile你就在命令窗处输入 compass watch -p 监听,这样的话就会自动编译你更改的.scss 或.sass文件,将其输出到stylesheets中的对应文件.css中

好了,写完了。适合对sass ,compass,bootstrap有所了解的园友。

 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!