我提到了this发布以使我的悬停工作。但那里的解决方案对我不起作用。
我有类似的 HTML
<div id="top">
<div id="first">
</div>
<div id="second">
</div>
<div id="third">
<div id="hiddentext">1st div is hovered</div>
</div>
</div>
我有很大的 css 文件...你可以看到 fiddle here
任何人都可以帮助我让我的隐藏文本在悬停在“第一个”div 上时可见。
最佳答案
这样写
#first:hover + #second + #third > #hiddentext{
visibility:visible;
}
检查这个http://jsfiddle.net/Q5zt2/17/
已更新
这样写:
#first:hover ~ #third #hiddentext{
visibility:visible;
}
检查这个
关于css 可见性在悬停事件时不会改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9306761/