新建一个文件夹
1 cd 进入文件夹 ,cd E:\360data\重要数据\桌面\sass,
2 compass creat hello:当前目录创建sass工程,
3 sass文件夹放置sass文件,stylesheets生成的css文件,
4 compass create --bare --sass-dir "sass" --css-dir "css" --images-dir "img" --javascripts-dir "js" 指定创建的目录
5 E:\360data\重要数据\桌面\sass\hello\sass ,创建demo1.scss文件写样式,编译sass demo1.scss demo1.css编译成css文件,
6 sass -watch demo1.scss:demo1.css当scss文件变化的时候css文件自动变化
7 compass compile 编译文件 compass watch 监视文件的变化
8 config.rb:config.rubby文件,定义了一些路径。 require 'compass/import-once/activate'
# Require any additional compass plugins here. # Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts" # You can select your preferred output style here (can be overridden via the command line):输出风格
# output_style = :expanded or :nested or :compact or :compressed # To enable relative paths to assets via compass helper functions. Uncomment: 是否使用绝对路径
# relative_assets = true # To disable debugging comments that display the original location of your selectors. Uncomment:是否使用注释
# line_comments = false
9 中文注释
Encoding.default_external = Encoding.find('utf-8') engine.rb文件路径:
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\sass-3.4.15\lib\sass

demo1.scss

body{
background: lightgray;
font-size: 14px;
margin:0px;
margin-left:0px;
// this is the header style.
header{
font-weight: bold;
} footer{/*! This is the footer style.重要注释,压缩模式也会编译到css文件*/
text-align: center;
}
}

demo1.css

@charset "UTF-8";
body {
background: lightgray;
font-size: 14px; }
body header {
font-weight: bold; }
body footer {
/*! This is the footer style.重要注释,压缩模式也会编译到css文件*/
text-align: center; } /*# sourceMappingURL=demo1.css.map */

sass02的更多相关文章

随机推荐

  1. 洛谷 P1541 乌龟棋 (四维费用背包)

    一开始直接用01背包 后来发现这个物品和位置有关. 也就是价值不是固定的 后来看了题解 看了卡片最多就4 所以这是一个四维费用的背包, 每一维是卡片的数量 价值就是当前的位置的价值. 但是与常规的背包 ...

  2. 紫书 例题 11-6 UVa 658 (状态压缩+隐式图搜索+最短路)

    这道题用到了很多知识点, 是一道好题目.      第一用了状态压缩, 因为这里最多只有20位, 所以可以用二进制来储存状态 (要对数据范围敏感), 然后 涉及到了一些位运算.     第二这里是隐式 ...

  3. quick-cocos2d-x游戏开发【2】——项目结构分析、创建新场景

    创建完一个新项目之后,我们能够简单的看一看这个项目的文件组成,有这么一个文件层次结构 几个proj.*目录就不用说了,是相应的平台的解决方式,res专门存放我们的游戏资源.scripts存放我们的lu ...

  4. Linux平台不同解压缩命令的使用方法

    作者:郭孝星 微博:郭孝星的新浪微博 邮箱:allenwells@163.com 博客:http://blog.csdn.net/allenwells github:https://github.co ...

  5. SharePoint Search之(七)Search result- 结果源

    在使用搜索引擎的时候.非常多情况下,用户希望限定一下搜索范围,以便更加easy找到想要的结果. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvU1BGYXJ ...

  6. 巧妇能为少米之炊(1)——Android下小内存下的生存之道

    常常听到身边用安卓的朋友抱怨手机卡顿,内存动不动就快没了.而Google声称在512M的内存下也能流畅执行Android 4.4.究竟它做了什么? 总结一下它主要做了四件事: 1.优化内核,使用Act ...

  7. 是时候学一波STL了。。。

    都到如今了还不会STL,赶紧学习一下. .. 头文件#include<algorithm> 加上 using namespace std. 求下一个排列的函数:next_permutati ...

  8. HDU5053the Sum of Cube(水题)

    HDU5053the Sum of Cube(水题) 题目链接 题目大意:给你L到N的范围,要求你求这个范围内的全部整数的立方和. 解题思路:注意不要用int的数相乘赋值给longlong的数,会溢出 ...

  9. lucene LZ4 会将doc存储在一个chunk里进行Lz4压缩 ES的_source便如此

    默认情况下,Elasticsearch 用 JSON 字符串来表示文档主体保存在 _source 字段中.像其他保存的字段一样,_source 字段也会在写入硬盘前压缩.The _source is ...

  10. windows电脑空间清理

    最近电脑空间又快满了,想下载一些好电影音频资源都要先临时清理一些文件才行,今天有时间就彻底整理一下,将整理过程及用到的好工具都记录一下,方面下次再遇到问题时可以很方面的参考执行. 1.分析磁盘空间占用 ...