【发布时间】:2014-07-22 18:27:36
【问题描述】:
我正在尝试使用 AngularJS 制作一些动画,但在尝试使用 Stylus 设置 AngularJS 动画 CSS 类时遇到了问题。我需要最终的 CSS 看起来像这样:
.test-animation-class.ng-hide-remove,
.test-animation-class.ng-hide-add.ng-hide-add-active {
opacity 0
}
我尝试了以下触控笔:
.test-animation-class
&.ng-hide-remove
&.ng-hide-add
&.ng-hide-add-active
opacity 0
但结果看起来像这样:
.test-animation-class.ng-hide-remove.ng-hide-add-active,
.test-animation-class.ng-hide-add.ng-hide-add-active {
opacity 0
}
有没有办法将 .ng-hide-add-active 类指定为仅在直接父 CSS 类 .ng-hide-add 上,而不是在 .ng-hide-remove 类上?
【问题讨论】:
-
哇,多么棒的,深思熟虑的问题!