1. 程式人生 > >div添加cursor:pointer;失效問題。

div添加cursor:pointer;失效問題。

cursor pin pos top -i 問題 ren 設置 poi

如果你不小心給其它盒子設置了z-index屬性顯示在最上層而又沒有將該盒子進行隱藏。

<style> .bottom { position: absolute; width:100px; height:100px; background:pink; cursor:pointer; } .top { z-index:999; width:200px; height:200px; background-color: transparent; position: absolute; } </style> <div class="top"></div> <div class="bottom"></div>

那麽這是給看到的盒子設置cursor屬性時無效,將設置了z-index的最上層盒子設置display:none;,問題就得到解決。

div添加cursor:pointer;失效問題。