less中:
child{
&:extend(.father)
}
继承: 子类( child) 与 父类(.father) 即 继承 与 被继承
继承结果: 父类,子类{ ... }
.inner{
&:extend(.juzhong); //这里 & 相当于 .inner,用于伪类选择器
}
编译后的css:
.juzhong,
.inner {
此处为.juzhong的样式
}
less中:
child{
&:extend(.father)
}
继承: 子类( child) 与 父类(.father) 即 继承 与 被继承
继承结果: 父类,子类{ ... }
.inner{
&:extend(.juzhong); //这里 & 相当于 .inner,用于伪类选择器
}
编译后的css:
.juzhong,
.inner {
此处为.juzhong的样式
}