したがって、このコードは、「#header」にカーソルを合わせると「.now」を 20 ピクセル上に移動し、カーソルを離すと元に戻します。
$(document).ready(function() {
$('#header')
.hover(function() {
$(".now").stop().animate({ top: -20 }, 'fast');
}, function() {
$(".now").stop().animate({ top: 0 }, 'fast');
});
});
「.now」を移動するだけでなく、45度回転させるにはどうすればよいですか?