【问题标题】:Angular ngAnimate how to hide element after ngHide animation?Angular ngAnimate 如何在 ngHide 动画后隐藏元素?
【发布时间】:2014-10-07 17:53:40
【问题描述】:

目前,当一个元素通过 ng-hide 隐藏时,首先该元素显示为“none”,然后动画发生。动画完成后是否可以添加 display="none"?

【问题讨论】:

    标签: angularjs ng-animate ng-hide


    【解决方案1】:

    常见的建议是为.ng-hide-add , .ng-hide-remove 类添加display: block !important 规则。 hide类的add和remove版本由ng-animate添加并在相关动画后移除。

    来源:https://docs.angularjs.org/api/ng/directive/ngHide

    http://ng.malsup.com/#!/css-animations-for-ng-hide_ng-show

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-15
      • 2017-08-16
      • 1970-01-01
      • 2013-08-24
      • 2012-03-13
      • 2019-01-16
      • 1970-01-01
      • 2014-08-21
      相关资源
      最近更新 更多