1.不传@h,@c === @h; 2.元素width = @w, 元素height = @h*2 3.配合上.center()实现图标居中 less版本: //上下左右居中 .center(){ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } //三角形 //方向,颜色,宽度,高度 .triangle(right, @c, @w, @h: @w){ border-left: @w soli