jquery fadeOut 不显示:无;



我正在做一个项目,一旦提交了表单,就会有两个文本淡入和淡出。一切都很好。但在现实中,渐变只是将不透明度降到零。我需要它来做无显示;

$('#text-7').delay(3000).fadeOut(1000);

在"text-7"下有一些对象具有鼠标悬停操作。操作完成后,文本不透明度在技术上为零,而不是显示为零。所以下面的物体不能再悬停了。

编辑:

假设此文本在表单提交后出现和消失

<div id="storyline">
<div id="text-6" class="justify-content-center align-items-center">
<h1 class="text-center">Text 1</h1>
</div>
<div id="text-7" class="justify-content-center align-items-center">
<h1 class="text-center">Text 2</h1>
</div>
</div>

现在,在他的下面有一个现存的物体,它应该是可以悬停的。但不是,因为text-7正在阻止它。

函数fadeOut((有一个回调函数,在fadeOut转换后执行。
$('#text-7').delay(3000).fadeOut(1000, function (){
$(this).css({ display: "none" });
});

最新更新