Data.$notification
.delay(1500)
.animate({
right: '+=' + (Data.$notification.width() + 45)
}, 700)
.delay(2500)
.animate({
right: '-=' + (Data.$notification.width() + 45)
}, 700, function() {
$(this).remove();
});
但它不是不够光滑,所以服用人民的意见,我想用转换3D CSS。 ATM我无法得到它的工作,我已经试过:
Data.$notification
.delay(1500)
.addClass('move-into-view')
.delay(2500)
.removeClass('move-into-view').addClass('move-outof-view')
.delay(1500)
.remove();
凡
.rotate-notification.move-into-view {
-webkit-transform: translate3d(-175px, 0, 0);
}
.rotate-notification.move-outof-view {
-webkit-transform: translate3d(175px, 0, 0);
}
这实际上是可能的?还是我以这种错误的方式去做?
我没有看到你实际定义'-webkit-transition'的CSS中的任何地方。 –