How to make links clickable with negative z-index?

╄→гoц情女王★ 提交于 2019-12-12 10:44:39

问题


I am using drop-down menu in my header for notification, but when drop down opens all the div's behind that are visible then I gave z-index to all the divs but the links on those div's are not clickable now!

drop-down div CSS:

.drop-down{
   overflow:scroll;
   overflow-x:hidden;
}

and the div's behind it are

#main-div{
   z-index:-1;
   position:absolute;
}

回答1:


I guess that the negative z-index places the links underneath the body.

Use a positive z-index, for example 10 on the element that should be at the back and 20 on the element that should be in front.



来源:https://stackoverflow.com/questions/29428122/how-to-make-links-clickable-with-negative-z-index

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!