如何使用负Z索引使链接可点击?

编程入门 行业动态 更新时间:2024-10-10 21:25:53
本文介绍了如何使用负Z索引使链接可点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在标题中使用了下拉菜单进行通知,但是当下拉打开后所有可见的div都打开时,我给出了 z-index 到所有div,但这些div上的链接现在无法单击!

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!

下拉div CSS:

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

和后面的div是

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

推荐答案

我想是负面的 z-index 将链接置于下方。

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

使用正数 z-index ,例如元素后面的 10 和 20 应该放在前面的元素上。

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.

更多推荐

如何使用负Z索引使链接可点击?

本文发布于:2023-11-24 23:33:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627356.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   索引   链接

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!