gpt4 book ai didi

jquery - 如何使用 jQuery 为文本颜色设置动画?

转载 作者:行者123 更新时间:2023-12-01 07:02:28 26 4
gpt4 key购买 nike

$(document).ready(function(){
$('a.nav_menu')
.css( {backgroundPosition: "0 0"} )
.mouseover(function(){
$(this).animate({
backgroundPosition:"(-650px 0)",
'color': '#000000'
}, {duration:700})
})
.mouseout(function(){
$(this).animate({backgroundPosition:"(0px 0)"}, {duration:900, complete:function(){
$(this).css({backgroundPosition: "0 0"})
}})
})
});

这有什么问题吗?文本颜色不变。

最佳答案

您需要使用 jQuery UI effectscolor animation动画颜色插件。

关于jquery - 如何使用 jQuery 为文本颜色设置动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2008302/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com