2015-07-02 77 views
0

我想用ng-show和css转换做一个动画,其中容器从右侧滑到中心,然后从中心滑到左侧。角动画,向右滑动滑出左侧

这里我的代码:

<span class="test" ng-show="showContainer == 'first'">Content One</span> 
<span class="test" ng-show="showContainer == 'second'">Content Two</span> 
<span class="test" ng-show="showContainer == 'third'">Content Three</span> 

CSS:

.test { 
    left: 0px; 
    @include transition(left, 5s, ease-in-out); 
} 

.test.ng-hide { left: 2000px;} 

所以我想如果有什么可以像

.test.ng-hide-active { left: -2000px; } 

在它的右侧滑动的瞬间中心,然后它回到正确的位置。

使用css和ng-show可以吗?

谢谢!

回答

0

啊,我想通了,它与.ng-hide-add-active类一起工作! 角度规则!