看文档elementui 转 element ui中的

看文档elementUI文档  当中&是什么用途?

 

css学习杂记

 

1、css中的&语法

&是sass的语法,代表上一级选择器。

例如:

1
2
3
4
5
6
7
8
.el-row {
    margin-bottom20px;
    &:last-child
 
{
    margin-bottom0;
}
}

相当于css写法:

1
2
3
4
5
6
.el-row {
    margin-bottom20px;
}
    .el-row:last-child {
        margin-bottom0;
    }

  

posted on 2022-12-08 17:18  xiaoluoke  阅读(15)  评论(0编辑  收藏  举报

导航