1. div鼠标悬停控制子控件显示与隐藏
悬停在父辈div上,子div显示
.son{
display: none;
}
.father:hover .son{
display: block;
}<br><br><div class="father"><br> SHOW<br> <div class="son"><br> oky<br> </div><br></div>
2.相邻div控制控件显示与隐藏(下面的隐藏和显示)
.two{
display: none;
}
.one:hover + .two{
display: block;
}
<div class="one">
oky
</div>
<div class="two">
show
</div>