在firefox (相当糟糕)和chrome (ok)之间获得不同的性能和效果。有时这不能完成第一个动画,有时会卡住。
我的结构正确吗?
$notification.animate({
top: '-=' + ($notification.outerHeight() + 20)
}, 1500, function() {
$(this).delay(2000);
$(this).animate({
top: '+=' + ($notification.outerHeight() + 20)
}, 1500, function() {
});
});发布于 2011-11-14 11:52:18
试试这个:
$notification
.animate({
top: '-=' + ($notification.outerHeight() + 20)
}, 1500)
.delay(2000)
.animate({
top: '+=' + ($notification.outerHeight() + 20)
}, 1500);编辑:http://zequinha-bsb.int-domains.com/notification.html的小提琴
发布于 2011-11-14 11:48:59
尝尝这个
$notification.animate({
top: '-=' + ($notification.outerHeight() + 20)
}, 1500, function() {
$(this).delay(2000).animate({
top: '+=' + ($notification.outerHeight() + 20)
}, 1500, function() {
});
});https://stackoverflow.com/questions/8117065
复制相似问题