2011-02-07 36 views
0

我想使这个CSS3效果jQuery的版本,以便它也可以在FF和IE:的jQuery相当于对CSS3过渡易于在

a:hover {color: #354250; -webkit-transition:background 500ms ease-in;} 
    a.more:hover, a.more:focus, a.more:active {background-position: 0 -18px;} 
    a.more:link, a.more:visited { 
    background: url(images/moreButton.png) no-repeat 0 0; 
    display: inline-block; 
    height:18px; 
    margin-top:10px; 
    text-indent: -9999px; 
    width:77px; 
} 

我尝试没有工作,这里是我' 到目前为止。

$("a.more").hover(function() { 
    $(this).stop().animate({ color: '#354250', backgroundPosition: '0px -18px' }, slow, function() { 
     $(this).stop().animate({ color: '#ad5332', backgroundPosition: '0px 0px'}, 0); 
    }); 
}, function() { 
    $(this).stop().animate({ color: '#ad5332', backgroundPosition: '0px 0px' }, 0); 
}); 

你有任何想法如何解决这一问题?非常感谢你!

+0

首先,查看它:http://www.google.com/search?client=safari&rls=zh-CN&q=jquery+animate+background+position&ie=UTF-8&oe=UTF-8。另外,你不需要嵌套这样的动画,你可以链接它们! – 2011-02-07 23:27:55

回答

1

尝试this,它有很好的内置jQuery Ui的功能。

+0

非常感谢您的链接。我会仔细看看的! – Sebsemillia 2011-02-08 15:33:04