当前位置: 移动技术网 > IT编程>网页制作>CSS > div添加cursor:pointer;失效问题。

div添加cursor:pointer;失效问题。

2019年01月16日  | 移动技术网IT编程  | 我要评论

如果你不小心给其它盒子设置了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;,问题就得到解决。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网