gpt4 book ai didi

javascript - 淡入();淡入然后淡出然后再淡入?

转载 作者:行者123 更新时间:2023-11-28 20:37:11 24 4
gpt4 key购买 nike

jsfiddle:

http://jsfiddle.net/ZcbUW/

当您将鼠标悬停在蓝色 div 顶部并且不移动鼠标时,文本会淡入、淡出,然后淡入。我不知道为什么。

<html>

最佳答案

$("#menu, #arrow").mouseenter(function () {
$('#arrow').stop(true, false).fadeOut("fast");
$("body").children(':not(#menu)').children(':not(#arrow)').css("-webkit-filter", "blur(2px)");
$("#menu").stop().animate({
width: "300px"
}, 300, function () {
$('.text').fadeIn(200);
});
})
$("#menu").mouseleave(function () {
$("#menu").stop().animate({
width: "5px"
}, 300, function () {
$('#arrow').stop(true, false).fadeIn("slow");
});
$("body").children(':not(#menu)').css("-webkit-filter", "none");
$('.text').fadeOut(100);
});

你的选择器很奇怪。因此,悬停在菜单和箭头上都会触发。试试这个:http://jsfiddle.net/ZcbUW/2/

关于javascript - 淡入();淡入然后淡出然后再淡入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15148091/

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