我只想通过淡出更改页面的背景图像,然后通过淡入替换第二个图像。
但我收到了以下错误提示:
但我收到了以下错误提示:
Uncaught TypeError: Object url(file:///C:/Users/.../p1bg_cutted.png) has no method 'fadeOut'
$('body').css("background-image").fadeOut('slow',function(){
$("body").css("background-image",
"url(Images/son_componentler/p2bg_cutted.png)").fadeIn('slow')
});
我可以在不淡入/淡出的情况下更改图像,但我猜在那种情况下,我可能会犯语法错误。