我试图在hide()上实现缩小动画,based on the answer上的bootstrap-modal(使用Bootstrap 2.3.2)的github回购。Bootstrap Modal缩小动画
的想法是添加CSS过渡,并拦截hide
事件,像:
$modal.on('hide', function() {
$modal.css({top: 0, left: 0, transform: 'scale(0.1, 0.1)'});
// return false; // uncomment this line to see zoom out
});
的问题是,有机会看到动画之前的模式是隐藏的。返回false
显示动画,但保持模式框完成隐藏。
我该如何完成隐藏过程但仍然看到动画?
见小提琴在http://jsfiddle.net/dtyohc28/5/
TIA
它的工作原理,所以我upvoted它,但我更喜欢一个更干净的解决方案,如果可能的话。 – isapir 2015-03-31 01:57:18