gpt4 book ai didi

悬停时 jQuery 动画边框颜色?

转载 作者:行者123 更新时间:2023-12-03 21:52:49 25 4
gpt4 key购买 nike

使用 color plugin悬停时设置背景颜色动画。

$(function() {
$('.listing-2 li a').mouseover(function() {
$(this).animate({
backgroundColor: "#0e7796"
}, 'fast');
});
$('.listing-2 li a').mouseout(function() {
$(this).animate({
backgroundColor: "#d6f2c5"
}, 'fast');
});
});

如何对边框颜色执行相同的操作?

最佳答案

在谷歌中找到

    $('.listing-2 li a').mouseover(function() {
$(this).animate({ borderTopColor: "#0e7796" }, 'fast');
});
$('.listing-2 li a').mouseout(function() {
$(this).animate({ borderTopColor: "#fff" }, 'fast');
});

它必须是“borderTopColor”(或左、右、下)而不是“borderColor”。

关于悬停时 jQuery 动画边框颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/813493/

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