很感谢UP主,自己私下写了一遍.先入个门.等以后用到再深入学习.
sass版本/less版本都有-->
https://github.com/pheromone/cssStudy/tree/master/sass:less
sass版本/less版本都有-->
https://github.com/pheromone/cssStudy/tree/master/sass:less
2019-02-08
如果不使用匹配模式,其实下面这种方法更简单。
.triangle(@p: top, @w: 5px, @c:#ccc){
width: 0;
height: 0;
overflow: hidden;
border-width: @w;
border-style: dashed dashed dashed dashed;
border-color: transparent;
border-@{p}-color: @c;
border-@{p}-style: solid;
}
.triangle(@p: top, @w: 5px, @c:#ccc){
width: 0;
height: 0;
overflow: hidden;
border-width: @w;
border-style: dashed dashed dashed dashed;
border-color: transparent;
border-@{p}-color: @c;
border-@{p}-style: solid;
}