[TOC] ## 示例 ``` #sidebar { a { text-decoration: none; } } ``` ## 特性 ### 嵌套选择器 ``` #sidebar { a { text-decoration: none; } } ``` ### 嵌套属性 ``` #footer { border: { width: 1px; color: #ccc; style: solid; } } //编译为 #footer { border-width: 1px; border-color: #cccccc; border-style: solid; } ``` ### 引用父选择符: & ### 变量: $ ``` $width: 5em; 然后,您可以在属性中引用它们: #main { width: $width; } ``` ### 混入 ``` @mixin rounded($amount) { -moz-border-radius: $amount; -webkit-border-radius: $amount; border-radius: $amount; } mixin与@include指令一起使用: .box { border: 3px solid #777; @include rounded(0.5em); } ```