前端 - sass嵌套,.child{.parent & { }} 无效?

浏览:23日期:2023-01-18

问题描述

<span ng-class='{’group-expand’: isExpand}'> <i class='icon-arrow-right'></i></span>

@mixin rotate($deg) { -webkit-transform: rotate($deg); -moz-transform: rotate($deg); -ms-transform: rotate($deg); -o-transform: rotate($deg); transform: rotate($deg);}//solution1.icon-arrow-right { @include rotate(0deg); .expand & {@include rotate(90deg); }}//solution2.icon-arrow-right { @include rotate(0deg);}.expand .icon-arrow-right { @include rotate(90deg);}

请问为何 solution1 无效呢?

问题解答

回答1:

复制你的代码 编译成功是你scss是版本问题吧

相关文章: