css - CSS 的 Z-index 问题

标签 css z-index

我需要将 page1、page2 和 page3 链接隐藏在#site div 后面。现在他们不是。它必须是一些 z-index 问题,虽然我使用的 z-index 没有工作。

所以#nav ul ul li 应该出现在#site div 后面。然后,当您将鼠标悬停在“父页面”上时,它会显示这些页面。

这是网站的演示:http://tempsmz.hostzi.com/

最佳答案

z-index 属性仅适用于定位元素(固定、绝对和相对)。尝试向元素添加 position: relative; 并应用所需的 z-index,例如 1 用于导航,2 用于站点容器。

关于css - CSS 的 Z-index 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11813518/

相关文章:

html - 在不扭曲图像的情况下动画div高度

css - Bootstrap 轮播与页面中心对齐

javascript - 我怎样才能简化这段代码? JavaScript + CSS3

javascript - Show only 7 list items in list, on "next"click hide current 7 show next 7, same with "previous"click

tabs - CSS 标签重叠

d3.js - IE9 检测到与 Chrome/Firefox 不同的 z-index 事件 - 如何解决?

border - css 曲线边框渲染奇怪

jquery - 问题 : Menu UL is always behind jquery dialog

css - 有 IE 错误的 z-index 问题 - CSS

css div无法显示在其他之上