【问题标题】:increment 0.1 to style with every ng-repeat每次 ng-repeat 增加 0.1 以设置样式
【发布时间】:2018-11-02 12:05:09
【问题描述】:

我正在尝试为每个 ng-repeat 增加 0.1 到动画显示。这可能是普通风格还是 ng 风格?我正在使用 AngularJS。

<tr ng-repeat="o in originalOrder | orderBy:'sort'" class="animated bounceIn" style="animation-delay: 0.1s;">

我希望第一个为 0.1,第二个为 0.2,第三个为 0.3,依此类推。

我正在使用 animate.css

谢谢

【问题讨论】:

  • 我正在使用 animate.css
  • 我认为您应该查看ngAnimate 模块。 ng-repeatng-moveng-leave 这些延迟事件

标签: html css angularjs animate.css


【解决方案1】:
<tr ng-repeat="o in originalOrder | orderBy:'sort' track by $index" class="animated bounceIn" ng-style="{'animation-delay': (($index+1)/10)+'s'}">

【讨论】:

    猜你喜欢
    • 2017-07-28
    • 2015-08-10
    • 2016-05-24
    • 1970-01-01
    • 2013-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多