div添加cursor:pointer;失效问题。
如果你不小心给其它盒子设置了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;,问题就得到解决。
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
-
-
-
-
-
CSS中的四种定位区别详解
我们都知道,前端开发里面的css中常用的定位方式有普通定位,相对定位,绝对定位、固定定位定位这四种。但是很多零基础的前端小白都不知道这4种定位方式都有什么作用和...
[阅读全文]
网友评论