gpt4 book ai didi

jquery - 如何使弹出式 div 悬停在 jquery 中的链接上?

转载 作者:太空狗 更新时间:2023-10-29 13:55:44 24 4
gpt4 key购买 nike

如何在 jquery 中使弹出窗口悬停在链接上?

<div id="floatbar">
<a href="" onclick="make it float 10px under this yay">
</div>

最佳答案

jquery

$("#floatbar").click(function(e){
e.preventDefault();
$(this).find(".popup").fadeIn("slow");
});

CSS

#floatbar {
position:relative;
}

.popup {
position:absolute;
top:10px;
left:0px;
height:30px;
background:#ccc;
display:none;
}

html

<a id="floatbar" href="#">
<div class="popup">Hi there</div>
click here
</a>

关于jquery - 如何使弹出式 div 悬停在 jquery 中的链接上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5270921/

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