1.创建less文件basic.less
@masterColor:#ff6699;
@masterColor-border:lighten(@masterColor,20%);
@padding-sm:10px;
@ns:~"wos-";
2.创建layout.less文件
body{
background:@masterColor;
header{
width:100%;
height:200px;
border:1px solid @masterColor-border;
li{
float:left;
padding:@padding-sm;
}
}
}
3.创建index.less文件
@import "./basic.less";
@import "./layout.less";
4.安装less
npm install less -g
5.打包文件
lessc index.less index1.less