我創建了動態背景鼠標懸停此代碼的工作,但它不工作,只改變爲其他的背景,但是當我使用功能animate
不顯示效果:jQuery的動畫不爲我
$(".b_header").mouseover(function() {
$(this).css("background-image","url(images/bot/head_down.png)");
/*
Also I've tried other effects and nothing
$(this).css({backgroundPosition: "0 0"});
$(this).animate(
{backgroundPosition:"(-20px -53px)"},
{duration:500});
*/
$(this).animate({ opacity: 5 }, 3000);
});
[jquery animate background position]的可能的重複(http://stackoverflow.com/questions/5171080/jquery-animate-background-position) – epascarello 2012-08-03 17:54:52
'opacity'從0變爲1. – 2012-08-03 17:55:11
'opacity'從'0' (透明)到'1'(不透明) – Mathletics 2012-08-03 17:55:13