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

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

问题描述

我正在使用 ngAnimate 模块,但是我所有的 ng-ifng-show 等都受此影响,我想将 ngAnimate 用于某些选定的元素.对于性能和显示和隐藏非常快速的元素中的一些错误.

谢谢.

解决方案

只需将此添加到您的 CSS 中即可.最好是最后一条规则:

.no-animate {-webkit-transition:无!重要;过渡:无!重要;}

然后将 no-animate 添加到要禁用的元素类.示例:

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.

thanks.

解决方案

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天全站免登陆