小编use*_*765的帖子

透明div下方的可点击div

是否有可能有一个绝对定位的透明div覆盖一系列可点击的div?我希望能够将鼠标悬停在下方的红色div上以获得响应.

<style type="text/css">

#holder{
    width:200px;
    height:200px;
}
.clickMe {
    width:100px;
    height:100px;
    cursor:pointer;
    background-color:red;
    border:1px solid black;
    float:left;
    margin:-1px;
    padding:0;
}
.hidey {
    position:absolute;
    top:0;
    left:0;
    z-index:50;
    height:50%;
    width:50%;
    opacity:.25;
    background-color:black;
}
</style>
<div class="hidey"></div>
<div id="holder">
    <div class="clickMe"></div>
    <div class="clickMe"></div>
    <div class="clickMe"></div>
    <div class="clickMe"></div>
</div>
Run Code Online (Sandbox Code Playgroud)

html css transparency z-index css-position

1
推荐指数
1
解决办法
874
查看次数

标签 统计

css ×1

css-position ×1

html ×1

transparency ×1

z-index ×1