大家好,我想要用jQuery来实现按钮背景色的动画效果。
$(document).ready(function(){
$('button').mouseenter(function(){
$('button').animate({
background-color:"blue"},1000);
});
$('button').mouseleave(function() {
$('button').animate({
background-color:"white"},1000);
});
});
我做错了什么?还有一件事,你能够用通俗易懂的语言解释一下吗? :D
附注:我正在使用bootstrap