我的HTML结构如下:
<div class="boxes workshops wrapl">
<a href="#" id="showw1" class="workshops-button lfloat">Show it</a>
</div>
<div class="boxes exhibitions">
<a href="#" id="showex1" class="exhibitions-button lfloat">Show it</a>
</div>
<div class="boxes gallery">
<a href="#" id="showex1" class="gallery-button lfloat">Show it</a>
</div>
类.boxes是彼此相邻设置的正方形。大约有30个盒子。最初,所有框都设置为opacity:1,所有-button类都设置为opacity:0。
但是,如果我将鼠标悬停在 .boxes 内,链接也是可点击的。
如果您看到 Jsfiddle,我仍然可以click为.boxes那些已经淡出或当我目前处于home状态时。
编辑#1 以下是相关代码: