好吧,它看起来确实像一个 Angular.js 动画错误。似乎如果一个类没有为它注册一个 ng-amination,它就永远不会再尝试检查它是否有动画(至少在重新加载页面之前)。一个可能的解释(我在这里推测)可能是 Angular.js 在错误时取消注册它可能在类上拥有的任何侦听器。
无论如何,您可以通过添加一个互补的最小宽度声明来解决这个问题,该声明带有即时动画,涵盖所有可用的分辨率。
例如:
@media only screen and (min-width : 640px) {
.animate-show-hide.ng-hide-add, .animate-show-hide.ng-hide-remove {
-webkit-transition:all linear 0.0001s;
-moz-transition:all linear 0.0001s;
-o-transition:all linear 0.0001s;
transition:all linear 0.0001s;
display:block!important;
}
.animate-show-hide.ng-hide-add.ng-hide-add-active,
.animate-show-hide.ng-hide-remove {
opacity:0;
}
.animate-show-hide.ng-hide-add,
.animate-show-hide.ng-hide-remove.ng-hide-remove-active {
opacity:1;
}
}
重要的!请注意,我使用了非常短的动画间隔,而不是 0。这是因为如果动画长度为 0 - 它会被优化掉,从而导致相同的错误。