0

我有一张桌子,而 tr 是由ng-repeat. 当我过滤它们(在这种情况下更改页面)时,所有行都被新行替换。但是在一瞬间,我们会看到旧的过滤行(例如第 3 页)和新过滤的行(例如第 4 页)。这很丑陋,因为它把我的设计搞砸了十分之一秒。

有没有办法使过渡无缝?我之前有ng-repeat动画(AngularJS 1.2.0RC1),但同样的事情发生了(虽然时间更长),我认为它可以通过禁用动画来修复。不幸的是,它没有解决它。

有什么想法吗?

[编辑]

这是我用于动画的 CSS,在禁用它之前

.animate.ng-enter {
  -webkit-animation: enter_sequence 0.2s linear; /* Safari/Chrome */
  -moz-animation: enter_sequence 0.2s linear; /* Firefox */
  -o-animation: enter_sequence 0.2s linear; /* Opera */
  animation: enter_sequence 0.2s linear; /* IE10+ and Future Browsers */
}
@-webkit-keyframes enter_sequence {
  from { opacity:0;}
  to { opacity:1;}
}
@-moz-keyframes enter_sequence {
  from { opacity:0;}
  to { opacity:1;}
}
@-o-keyframes enter_sequence {
  from { opacity:0;}
  to { opacity:1;}
}
@keyframes enter_sequence {
  from { opacity:0; }
  to { opacity:1; }
}

.animate.ng-leave {
  -webkit-animation: leave_sequence 0.2s linear; /* Safari/Chrome */
  -moz-animation: leave_sequence 0.2s linear; /* Firefox */
  -o-animation: leave_sequence 0.2s linear; /* Opera */
  animation: leave_sequence 0.2s linear; /* IE10+ and Future Browsers */
}
@-webkit-keyframes leave_sequence {
  from { opacity:1; }
  to { opacity:0; }
}
@-moz-keyframes leave_sequence {
  from { opacity:1; }
  to { opacity:0; }
}
@-o-keyframes leave_sequence {
  from { opacity:1; }
  to { opacity:0;}
}
@keyframes leave_sequence {
  from { opacity:1; }
  to { opacity:0; }
}
4

1 回答 1

0

您是否尝试过延迟 css 中的转换?为我工作

于 2013-09-04T10:24:58.900 回答