-
-
Save XiongJingzhi/1da517d2f75834e0b510ea5f03826423 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 嵌套规则 (Nested Rules) | |
2. 父选择器 & (Referencing Parent Selectors: &) | |
3. 属性嵌套 (Nested Properties) | |
4. 变量 $ | |
5. 导入@import, | |
6. 控制指令 (Control Directives) | |
7. 混合指令 (Mixin Directives), | |
@mixin 定义(参数 $width(Arguments, 通过 $width : 1px, 设置default), 参数变量 … 声明(写在参数的最后方)) | |
@include 使用 | |
8. 函数指令 (Function Directives) | |
$grid-width: 40px; | |
$gutter-width: 10px; | |
定义 @function grid-width($n) { | |
@return $n * $grid-width + ($n - 1) * $gutter-width; | |
} | |
使用 #sidebar { width: grid-width(5); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment