【问题标题】:Angularjs: Cannot get ng-enter to workAngularjs:无法让 ng-enter 工作
【发布时间】:2013-11-18 18:03:36
【问题描述】:

我在使用 ng-enter 和 leave 时遇到了困难。如果我在我的 css 文件中声明为 .my-animation{...} 的 ng-view div 上有一个 css 类 my-animation,则动画可以工作。但是,当我将其重命名为 .my-animation.ng-enter{...} 时,它会停止工作。知道可能出了什么问题吗?我也一直在从教程/示例中复制粘贴工作的 css 类,但没有任何运气。

<div ng-view ng-cloak class=" animated slideInLeftCustom"></div>

作品:

.slideInLeftCustom {
    -webkit-animation-name: slideInLeft;
    -moz-animation-name: slideInLeft;
    -o-animation-name: slideInLeft;
    animation-name: slideInLeft;
}

不起作用:

.slideInLeftCustom.ng-enter {
    -webkit-animation-name: slideInLeft;
    -moz-animation-name: slideInLeft;
    -o-animation-name: slideInLeft;
    animation-name: slideInLeft;
}

我正在使用 AngularJS v1.2.0,目前最新的稳定下载。

干杯

我已将动画、路线和角度更新到 v 1.2.1,现在似乎可以正常工作了。

【问题讨论】:

  • 它工作,它停止工作:这是什么意思?动画? CSS选择器?更精确并显示一些代码。
  • 嘿,我认为这已经足够解释了。我现在更新了。干杯
  • 你用的是什么版本的Angularjs?
  • 我正在使用 AngularJS v1.2.0,目前最新的稳定下载。
  • 你在使用 angularjs 1.1.5 引入的新动画系统吗?你能设置一个 plunker 来显示你的配置和问题吗?

标签: angularjs animation css-animations


【解决方案1】:

我已将动画、路线和角度更新到 v 1.2.1,现在似乎可以正常工作了。

我从这里得到文件:http://code.angularjs.org/

【讨论】:

    猜你喜欢
    • 2018-05-09
    • 2018-04-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-02
    • 1970-01-01
    • 1970-01-01
    • 2017-08-18
    相关资源
    最近更新 更多