【发布时间】:2015-07-02 23:54:37
【问题描述】:
我想做一个带有 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 可以吗?
谢谢!
【问题讨论】:
标签: angularjs css animation ng-show