【发布时间】:2014-02-17 05:15:02
【问题描述】:
我正在对按钮进行动画效果,但它不能正常工作。鼠标悬停时会慢慢显示颜色,鼠标离开时会慢慢恢复正常。
我从jQuery Animate text-color on hover举了一个例子
这里是 jsfiddle: http://jsfiddle.net/eTymf/1/
$('.buttons').hover(
function() {
console.log(this);
// do this on hover
$(this).animate({
'borderBottomColor': '#2E9ECE',
'background-color': '#2E9ECE'
}, 'slow');
},
function() {
// do this on hover out
$(this).animate({
'borderBottomColor': '#FFDF85',
'background-color': '#FEFEFE'
}, 'slow');
});
【问题讨论】:
标签: javascript jquery css