定义混入
// @content
.forPc(@content) {
@media (min-width: 1024px) {
@content()
}
}
混入使用
.test {
background-color: @themeBgColor;
margin-bottom: 150px;
// 混入使用css键值对即可
.forPc({
// 直接使用css样式
// 此方案会作用在.test
width: 10px;
})
**or**
.forPc({
// 选择器和css样式
// 此方案会作用在.banner
.banner {
width: 10px;
}
})
**or**
.forPc({
// 两种方案也是可以混用的
width: 10px;
.banner {
width: 10px;
}
})
}