函数
不用函数写按钮
.btn {
width: 200px;
height: 30px;
border-radius: 15px;
background-color: blue;
border: 5px solid red;
color: black;
}
使用函数
@mixin a1($lift, $rikjh, $lk) {
width: $lift;
height: $lift;
border-radius: $lk;
}
@mixin na($color, $b-col, $ww, $ro:blue) {
background-color: $color;
border: $ww solid $ro;
color: $b-col;
}
button {
&:nth-child(1) {
@include a1(100px, 100px, 30px);
@include na(red, hotpink, 10px);
}
&:nth-child(2) {
@include a1(100px, 100px, 50px);
@include na(rgb(215, 253, 0), rgb(0, 255, 213), 10px);
}
&:nth-child(3) {
@include a1(100px, 100px, 50px);
@include na(rgb(51, 255, 0), rgb(162, 0, 255), 10px);
}
}
@mixin a1($lift, $rikjh, $lk) 函数 , 函数名字ÿ