div
悬停锚标签时如何显示孩子?当光标悬停锚标记时,我想显示一个div
with 类。botm
这是我正在使用的确切方案,所以请保持标签的顺序相同:
HTML:
<a> Hover me!</a>
<div class="faraz"> sdjfg
<div class="dikha">Stuff shown on hover</div>
<div class="botm"></div>
</div>
CSS:
div {
display: none;
}
a:hover ~ .faraz > .botm {
display: block;
background-color: RED;
height: 250px;
width: 960px;
}
.botm {
background-color: #0CC;
height: 50px;
width: 100%;
position: fixed;
top: 90px;
}