我不知道这里发生了什么。在Firefox和Chrome中,这是正常工作的,但在IE中不是这样的。我有一个固定的div(firstdiv),在悬停时显示另一个div(hiddendiv)。只要有一个div被悬停在上面,这个div就应该保持可见。然而,在IE中,当你将鼠标悬停在它上面时,它就消失了。为什么会这样?
我试过尝试不同的z索引值和定位,但我不明白为什么IE不能正确处理这个问题。
.firstdiv {
background: red;
position: fixed;
left: 10px;
bottom: 10px;
height: 50px;
width: 50px;
cursor: pointer;
z-index: 1110;
}
.hiddendiv {
background: blue;
position: fixed;
bottom: 60px;
height: 40px;
width: 244px;
display: none;
cursor: pointer;
z-index: 1200;
}
.firstdiv:hover + .hiddendiv {
display: block;
cursor: pointer;
}
.hiddendiv:hover {
display: block;
cursor: pointer;
}
<div class="firstdiv"></div>
<div class="hiddendiv"></div>