新建一个文件夹
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. 【BZOJ4071】【APIO2015】巴邻旁之桥

    题意: Description 一条东西走向的穆西河将巴邻旁市一分为二,分割成了区域 A 和区域 B. 每一块区域沿着河岸都建了恰好 1000000001 栋的建筑,每条岸边的建筑都从 0 编号到 1 ...

  2. [洛谷P3939]数颜色

    题目大意:有n个物品,每个物品有一个颜色.现在有两种操作:1.查询l-r内有多少颜色为c的物品并输出.2.将第x个物品和第x+1个交换.现在让你实现这些操作. 解题思路:首先一共有300000种颜色, ...

  3. 带入gRPC:gRPC Deadlines

    带入gRPC:gRPC Deadlines 原文地址:带入gRPC:gRPC Deadlines项目地址:https://github.com/EDDYCJY/go... 前言 在前面的章节中,已经介 ...

  4. POJ 2607 Fire Station

    Fire Station Time Limit: 5000ms Memory Limit: 65536KB This problem will be judged on PKU. Original I ...

  5. EularProject 42:单词解码出来的三角形数

    Coded triangle numbers Problem 42 The nth term of the sequence of triangle numbers is given by, tn = ...

  6. [MST] Restore the Model Tree State using Hot Module Reloading when Model Definitions Change

    n this lesson, we will set up Hot Module Reloading(HMR), making it possible to load new definitions ...

  7. BZOJ 2683 简单题 cdq分治+树状数组

    题意:链接 **方法:**cdq分治+树状数组 解析: 首先对于这道题,看了范围之后.二维的数据结构是显然不能过的.于是我们可能会考虑把一维排序之后还有一位上数据结构什么的,然而cdq分治却可以非常好 ...

  8. Swift环境下实现UILabel居上 居中 居下对齐

    首先在Xcode中新建.h文件,将下面代码复制进去 // // myUILabel.h // // // Created by yexiaozi_007 on 3/4/13. // Copyright ...

  9. HDOJ 5296 Annoying problem LCA+数据结构

    dfs一遍得到每一个节点的dfs序,对于要插入的节点x分两种情况考虑: 1,假设x能够在集合中的某些点之间,找到左边和右边距离x近期的两个点,即DFS序小于x的DFS序最大点,和大于x的DFS序最小的 ...

  10. 41.AngularJS 服务(Service)

    转自:https://www.cnblogs.com/best/tag/Angular/ 什么是服务? 在 AngularJS 中,服务是一个函数或对象,可在你的 AngularJS 应用中使用. A ...