@primary-color: #eec0dc;
@s:~‘@{header},@{footer}‘;
@{s}{
background-color: @primary-color;
}
#box {
width: 100px + 200;
}
header {
height: 100px;
> img {
display: block;
width: 100px;
height: 100px;
}
&.current {
height: 100px;
}
}
body {
@media screen and (max-width: 992px) {
background-color: antiquewhite;
}
@media screen and (max-width: 768px) {
background-color: aquamarine;
}
}
.mix(@w,@h:100px) {
width: @w;
height: @h;
margin: auto;
}
header {
.mix(1200px,10px);
}
原文:https://www.cnblogs.com/stefzi/p/14622304.html