这是我第一次使用jQuery,我参加了一个在线课程,但从未在网站上使用过它。
我的目标是在主页上让"Hello there“首先显示2秒,然后淡出,让”你的数字伴侣“淡入并永久停留。
我在这里一直在尝试一些相关的概念,并且越来越接近了。但我的结构似乎是错误的,因为: 1)这两样东西一开始都会出现,然后"hello there“开始消失,然后”你的伴侣被抬高了“--我希望"hello there”快速出现,然后消失2)我希望“你的数字伴侣”一旦出现就永远不会消失。
jQuery(document).ready(function(){
$(".hellothere").fadeOut(4500,function(){
$(".partner").fadeIn(10000, function(){
$(".partner").fadeOut(4500);
});
});
});<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<h1 class="hellothere"><span class="font-168856 font-444086" style="font-size: 65px; text-transform: uppercase;">Hello there.</span></h1>
<h1 class="partner"><span class="font-168856 font-444086" style="font-size: 65px; text-transform: uppercase;">Your partner in digital.</span></h1>
当我删除这个的时候:
function(){
$(".partner").fadeOut(4500);它破坏了整个事情(试图让它停止淡出)。
这里有什么建议吗?非常感谢。
https://stackoverflow.com/questions/47540708
复制相似问题