传参写法:
.border-radius(@radius){
-webkit-border-radius: @radius;
border-radius: @radius;
}
.profile-item-ava{
width: 36px;
height: 36px;
margin: 12px;
.border-radius(10px);
}
不传参默认值:
.border-radius(@radius:50%){
-webkit-border-radius: @radius;
border-radius: @radius;
}
.profile-item-ava{
width: 36px;
height: 36px;
margin: 12px;
.border-radius();
}
CSS:
.profile-item-ava {
width: 36px;
height: 36px;
margin: 12px;
-webkit-border-radius: 50%;
border-radius: 50%;
}