我试图在鼠标悬停时使用jQuery为backgroundColor中的更改设置动画.
我已经检查了一些例子,我似乎做对了,它适用于其他属性,如fontSize,但我使用backgroundColor和"无效属性"js错误.我正在使用的元素是div.
$(".usercontent").mouseover(function() {
$(this).animate({ backgroundColor: "olive" }, "slow");
});
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?