我正在做一个过渡,结合了宽度过渡和旋转过渡。
http://innouveau.nl/loodsboot-wp/test/index2.html

问题是,在Safari和Chrome中,过渡非常不稳定。

如您所见,在过渡期间会出现一个滚动条,我想这与它有关。当我将父级设置为overflow:hidden时,滚动条不可见,但抖动仍然存在:
http://www.innouveau.nl/loodsboot-wp/test/index1.html

当过渡仅在旋转时,不会晃动:
请参阅“ index3.html”(抱歉,尚未发布3个链接)

我正在使用jquery.transit lib,但也可以使用普通的CSS方式来实现。

最佳答案

我看到您的宽度是原来的两倍。我的解决方案是按比例缩放动画:

开始位置:

 $(.draggable).css({'-webkit-transform': 'rotate(0deg) scale(1) translate(0,0)'});


结束位置:

$(.draggable).css({'-webkit-transform': 'rotate(-90deg) scale(2) translate(0,-200px)'});


这是一个test demo

让我知道是否可行:)

08-18 09:55
查看更多