我正在尝试使用Angular JS 1.2来运行高度动画。我在这里有一个有关动物的动画工作:
http://plnkr.co/edit/YVtnXgjO3Evb6tz5DJOp?p=preview
这里的关键位是这个CSS:
.accordion-body {
height: 100px;
-webkit-transition: 0.5s linear all;
transition: 0.5s linear all;
}
.accordion-body.ng-hide-add,
.animate-show.ng-hide-remove {
display: block !important;
}
.accordion-body.ng-hide-add{
}
.accordion-body.ng-hide-remove{
}
.accordion-body.ng-hide {
height:0;
}
但是我无法弄清楚如何让打开项目。我显然在做脑死亡 - 我错过了什么?
答案 0 :(得分:11)
使用以下CSS:
.accordion-body {
height: 100px;
-webkit-transition: 0.5s linear all;
transition: 0.5s linear all;
}
.accordion-body.ng-hide-add,
.accordion-body.ng-hide-remove {
display: block !important;
height: 0px;
}
.accordion-body.ng-hide-remove.ng-hide-remove-active {
height: 100px;
}
.accordion-body.ng-hide-add{
height: 100px;
}
.accordion-body.ng-hide-add.ng-hide-add-active {
height: 0;
}
你搞砸了一个班级名称。