- 变量
@fontsize:12px;
@mySelector: banner;
.@{mySelector} {
font-weight: bold;
line-height: 40px;
margin: 0 auto;
}
- 混入
.mixin() { width: 100%; height: 200px; } .c{ .mixin(); }
- 引用父类
a { color: blue; &:hover { color: green; } }
.clearfix { display: block; zoom: 1; &:after { content: " "; display: block; font-size: 0; height: 0; clear: both; visibility: hidden; } }
- 输出
.clearfix { display: block; zoom: 1; } .clearfix:after { content: " "; display: block; font-size: 0; height: 0; clear: both; visibility: hidden; }
作者:Yoby 创建时间:2020-07-26 22:42
更新时间:2024-12-05 13:26
更新时间:2024-12-05 13:26