gpt4 book ai didi

javascript - 在鼠标悬停时显示文本

转载 作者:行者123 更新时间:2023-11-28 19:06:12 32 4
gpt4 key购买 nike

所以我试图让背景图像消失,然后在 div 中显示一些带有链接的文本。我已经让图像在鼠标悬停时消失,但我无法显示文本。这是我到目前为止所得到的。我对这些东西有点陌生。

/* I'm have the image removed with the first line, then setting the link
as hidden then trying to make it visible, but the link never shows */

$('#res').mouseover(function(){
$(this).removeClass('resume');
$('#reslink').css(visibility,visible);
});

HTML:

        <div id = "res" class = "floatleft squares resume"><a id = "reslin" class = "link" href="resume.php">link</a></div>
<div id = "pro" class = "floatleft squares projects"><a id = "prolin" class = "link" href="projects.php"></a></div>
<div id = "con" class = "floatleft squares contact"><a id = "conlin" class = "link" href="contact.php"></a></div>
<div id = "abo" class = "floatleft squares about"><a id = "abolin" class = "link" href="about.php"></a></a></div>

样式:

a{
display: block;
background: grey;
height: 100%;
width: 100%;
visibility: hidden;
}

如果需要更多信息,lmk,谢谢。

最佳答案

代替

$('#reslink').css(visibility,visible)

尝试

$('#reslin').css('visibility','visible')

关于javascript - 在鼠标悬停时显示文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3368624/

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