css - AngularJS 中的立方体动画

标签 css angularjs animation

我用过 this question创建一个立方体控件。

This is到目前为止我得到了什么。

我正在使用 ng-ifng-include 来触发动画

<div ng-repeat='view in views' class='cube container'>
    <div ng-if='view.name == selected' " + 
            ng-include='view.template' " + 
            ng-animate="{enter: 'animate-enter',
                            leave: 'animate-leave'}"> 
    </div>
</div>  

我有两个问题

  1. 当从 Pane 1 移动到 Pane 3 时,它应该经过 Pane 2。我做了一个循环,首先将选定的 Pane 更改为 #2,然后更改为 #3,但动画直接转到 #3。有没有一种方法可以“等待”,直到过渡到 #2 完成,然后再转到 #3 ?

  2. 我在固定大小的立方体控件时遇到问题。如果您在上面的示例中添加另一个 cube-viewer,您会看到它们重叠。

我的目标是一个纯 CSS 的解决方案(没有关键帧也没有 java 脚本/jquery 动画)

谢谢。

最佳答案

  1. 在 goTo() 方法中使用 goTOPrev()、goTONext() 方法。

    使用 $timeout,遍历 View ,直到达到正确的目标,即 500 毫秒。

  2. 移除固定的。

    style="/* position:fixed; */display:block; width:450px; padding:0; margin:0; border:1px solid #EEE;"...

关于css - AngularJS 中的立方体动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20757399/

相关文章:

jquery - Animate.css - 在继续之前等待动画完成

css - 线条动画 SVG,动画不起作用

html - 打印模式仍然显示 'hidden' 内容

javascript - jquery 插件与转换冲突 : translateY

javascript - 在 Angular 中解析 n 级深度 JSON

c# - xml转json后无法访问数据

CSS 动画延迟在 Chrome 中的行为与在 IE/Firefox 中的行为不同

html - 我怎样才能让两个列表项出现在页面的另一边?

html - CSS 覆盖 DIV.class border-top

c# - 无法获得 $http 响应