less的混合函数与sass的混合函数语法不太一样
/*定义变量,给定默认值*/
.flex(@hov:space-between,@col:center) {
display: flex;
justify-content: @hov;
align-items: @col;
}
/*调用*/
.container {
height:112px;
.flex;
}
/*输出:*/
.container {
height:112px;
display:flex;
justify-content:space-between;
align-items:center;
}