码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2019-01-15 18:30:43      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:point   poi   spl   失效   display   dex   显示   idt   round   

如果你不小心给其它盒子设置了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;失效问题。

标签:point   poi   spl   失效   display   dex   显示   idt   round   

原文地址:https://www.cnblogs.com/gzy-tw/p/10273358.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!