jquery animate函数不能处理背景色渐变,需要使用jquery.color插件
gitHub地址:https://github.com/jquery/jquery-color/
使用代码:
[color=red]注意:背景色属性要用backgroundColor,使用background无效。[/color]
jquery.color.js的gitHub地址:https://github.com/jquery/jquery-color/
gitHub地址:https://github.com/jquery/jquery-color/
使用代码:
$(function(){
$("#cdiv").animate({
backgroundColor:'#FF0000'
}, 1000)
})
[color=red]注意:背景色属性要用backgroundColor,使用background无效。[/color]
jquery.color.js的gitHub地址:https://github.com/jquery/jquery-color/