禁用nganimate的一些元素 [英] disable nganimate for some elements

查看:163
本文介绍了禁用nganimate的一些元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是ngAnimate模块,但我所有的 NG-如果 NG-节目等,由受影响,我希望利用ngAnimate一些选择的元素。
对于性能和显示和隐藏要素的一些bug非常迅速的。

I'm using the ngAnimate module, but all my ng-if, ng-show, etc, are affected by that, I want to leverage ngAnimate for some selected elements. For performance and some bugs in elements that shows and hide very speedy.

感谢。

推荐答案

只需添加到您的CSS。这是最好的,如果这是最后一条规则:

Just add this to your CSS. It is best if it is the last rule:

.no-animate {
   -webkit-transition: none !important;
   transition: none !important;
}

然后无动画添加到要禁用类的元素。例如:

then add no-animate to the class of element you want to disable. Example:

<div class="no-animate"></div>

这篇关于禁用nganimate的一些元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆