0
我刚刚用ngAnimate进入CSS动画。很酷的东西!我现在正在努力想出如何控制受某些动画影响的同胞元素的动画。ng-Animate:如何让兄弟div动画?
Plunker:https://plnkr.co/edit/XqpMPklO2SDlZQ1GIJ5Z?p=preview
例如,在上述plunker,顶格动画远很好,但底部的div没有。有没有办法让顶部动画时动画底部的div?
div.top {
width: 100%;
background-color: red;
height: 200px;
position: relative;
transition: 1s linear all;
opacity: 1;
top: 0;
}
div.bottom {
widows: 100%;
background-color: blue;
height: 300px;
}
button {
width: 100%;
padding: 25px;
}
div.top.ng-hide {
opacity: 0;
top: -1000px;
}
这似乎并没有从'高度动画工作时:100%;''要高度:0'。有没有办法处理百分比转换? –