1、css中的&语法
&是sass的语法,代表上一级选择器。
例如:
.el-row {
margin-bottom: 20px;
&:last-child
{
margin-bottom: 0;
}
}
相当于css写法:
.el-row {
margin-bottom: 20px;
}
.el-row:last-child {
margin-bottom: 0;
}
1、css中的&语法
&是sass的语法,代表上一级选择器。
例如:
.el-row {
margin-bottom: 20px;
&:last-child
{
margin-bottom: 0;
}
}
相当于css写法:
.el-row {
margin-bottom: 20px;
}
.el-row:last-child {
margin-bottom: 0;
}