http://jsfiddle.net/leonwho/98mD2/
HTML
<div id="account-setup-guide">
<div id="account_tour_info">
<ul>
<li class="setup_complete"><strong>1</strong> Sync!</li>
</ul>
</div>
</div>
CSS
#account-setup-guide {
position: relative;
margin: 30px 30px 20px 20px;
padding: 20px;
width: auto;
border: 5px solid orange;
background: orange;
}
jQuery
var animateThis = function() {
console.log('run animateThis');
$('#account-setup-guide').stop().animate({backgroundColor: '#ffffff'}, 500);
$('#account-setup-guide').animate({
background: 'white'
}, 500);
}
animateThis();
不知道为什么这不起作用,我已经使用了上面的 .animate
两个示例,但它在我当前的 jsfiddle 测试中不起作用:(
最佳答案
关于javascript - jQuery 动画背景颜色不动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21049005/