jQuery动画边框

嗨,我试图动画输入的边框,但无论我如何放置边框,它似乎似乎没有动画。

我目前的代码:

$(this).animate({border : '1px solid #f00'}, 'slow', 'linear');

您必须在完整的jquery中设置边框颜色和样式css属性:

 $(this).css({borderColor:"#f00",borderStyle:"solid"}).animate({borderWidth : '3px'}, 'slow', 'linear'); 

你需要在jquery中设置动画边框颜色的插件,请查看: http : //www.bitstorm.org/jquery/color-animation/

然后..

 $(this).animate({borderColor: '#f00'}); 

也许这可以帮助别人……

您需要一次为一个参数设置动画。

 border-width : '1px' 

要么

 border-color : '#f00'