jQuery的动画背景色上输入按键不灵
问题描述:
我绝对不知道为什么背景颜色没有改变,我已经花了太多时间在上面已经:jQuery的动画背景色上输入按键不灵
<input type="button" class="front-consultation-btn" value="Get A Free Consultation">
<script>
$('.front-consultation-btn').animate({ backgroundColor: '#FF0000', width: 400 }, 500);
</script>
为什么这只更改宽度属性?
答
为什么不使用CSS3?
.yourelement {
background: #fff;
}
.yourelement:focus, .yourelement:hover {
-webkit-transition: background-color 0.5s linear;
background: #ccc;
}
+2
我D说因为U不能给它添加回调吗? – DarkBee 2014-11-04 10:48:18
见http://stackoverflow.com/questions/190560/jquery-animate-backgroundcolor – 2012-08-14 19:22:28