次のコードは私に多くの問題を引き起こしています。.hover は背景画像を変更することに注意してください。まず、別の mouseenter と mouseleave ではなく、2 つを .hover と組み合わせるにはどうすればよいですか? 第二に、divが上にシフトしている間に背景画像が同時にフェードするようにするにはどうすればよいですか?
$('div.designbox.orangehello').mouseenter(function() {
$('div.designbox.orangehello').animate({
top: '-=10',
}, 55, function() {
$(this).addClass('hover');
});
});
$('div.designbox.orangehello').mouseleave(function() {
$('div.designbox.orangehello').animate({
top: '+=10',
}, 55, function() {
$(this).removeClass('hover');
});
});