多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 1.变量 ~~~ $bg:red; div{ $color:blue; border:1px solid $color; } ~~~ # 2.嵌套 ## 2.1选择器嵌套 ~~~ nav { a { color: red; head & { color:yellow; } } } ~~~ ~~~ //编译后 nav a { color: red; } header nav a { color: green; } ~~~ ## 2.2属性嵌套 ~~~ .box { font: { size:12px; family:"微软雅黑" } } ~~~ ~~~ .box { font-size: 12px; font-family: "微软雅黑"; } ~~~ ## 2.3伪类嵌套 ~~~ .row{ &::before,&::after{ content:""; display: table; } &::after{ clear: both; } } ~~~ ~~~ .row::before, .row::after { content: ""; display: table; } .row::after { clear: both; } ~~~