我有一个绝对定位的新闻框。当用户将鼠标悬停在它上面时,我创建了一个脚本来为其底部值设置动画。就是这样。
(function(){
var newsbox = $('div#news_div');
newsbox.on('mouseover',function(){
$(this).animate({'bottom':160},{duration:500});
});
newsbox.on('mouseleave',function(){
$(this).delay(20000).animate({'bottom':55},{duration:500});
});
})();
所以当我一次又一次地将鼠标悬停在它上面时,它会表现出不寻常的行为。你能告诉我吗?