less中的继承和less中混合的区别
- 使用时的语法格式不同 (选择器:extend(混合))
- 转换之后的结果不同(混合是直接拷贝, 继承是并集选择器)
.center{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.father:extend(.center){
width: 300px;
height: 300px;
background: red;
//.center;
.son:extend(.center){
width: 200px;
height: 200px;
background: blue;
//.center;
}
}