html - 尝试使用 z-index 隐藏部分 div

标签 html css twitter-bootstrap

这是我的页面:http://www.replyonline.co.uk/Brayborne/www/index.html

在主导航栏上,如果您单击“服务”,您会看到一个下拉菜单。导航类是 .nav nav-pills nav-stacked。

我希望此下拉菜单的顶部显示在 navbar-wrapper 下方,因此我在 navbar-wrapper 上设置的框阴影显示在下拉菜单中根据以下设计赋予它分层效果:-

enter image description here

有人能提供任何建议或 CSS 来实现这一目标吗?此外,如果有帮助,该站点是使用 Bootstrap 构建的。

谢谢,

最佳答案

有点hacky,但应该让你继续:

.dropdown-menu {
    z-index: -1;
}

#myCarousel {
    z-index: -2;
}

工作演示:

http://jsfiddle.net/EGmZ5/

关于html - 尝试使用 z-index 隐藏部分 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14648461/

相关文章:

html 将文本与不同的字体保持在一起

javascript - 动态元素上的 CSS 破坏了布局

javascript - 在事件选项卡中加载 Morris.js 图表( Bootstrap )

jquery - jCarouselLite 在与 Bootstrap 一起使用时不起作用

html - 使用显示 :block not working on hover 显示隐藏的跨度

css - 带有 Bootstrap 的 IE Mobile 上的折叠错误

html - BeautifulSoup : extracting from deeply nested <div>'s

html - 为 img 按钮制作一个 div 类

javascript - 文件准备好前可能采取的行动

javascript - 悬停时更改img标签内容