【发布时间】:2017-11-27 03:51:01
【问题描述】:
我希望一个 div 在悬停在不同的 div 上时消失,纯粹使用 CSS。 所以我有两个div
<div class="" id="target">I will disappear</div>
<div class="hover_box">Hover me</div>
还有我的 SCSS:
#target {
background-color: blue;
height: 100px;
width: 100px;
}
.hover_box {
background-color: red;
height: 100px;
width: 100px;
&:hover #target{
display: none !important;
/* background-color: green !important; */
}
}
但是,它不起作用。见这里:
【问题讨论】:
标签: javascript jquery html css sass