我一直试图为我的网站的背景颜色设置动画。我尝试了很多方法,但根本不起作用。
我想在代码的其他部分使用它,但这不起作用:
jQuery('div#Wrapper').animate({backgroundColor:'rgb(7,100,172)'),8500);
答案 0 :(得分:1)
如果您的div的ID为Wrapper,那么您的语法应为
$('#Wrapper').animate({backgroundColor:'rgb(7,100,172)'},8500);
您还错过了}
功能
animate
答案 1 :(得分:0)
修复语法错误(使用右括号代替括号),先包含jQuery,然后再包含jQuery UI。
jQuery('div#Wrapper').animate({backgroundColor:'rgb(7,100,172)'},8500);