固定菜单被相对定位的图像隐藏?

时间:2013-09-06 04:35:23

标签: html css

我有以下CSS:

#header-fixed {
  background: url(images/header-fixed-bg.png) repeat-x 0 0;
  border-bottom: 1px solid #111;
  position: fixed;
  top: -70px;
  width: 100%;
  z-index: 1000;
  -webkit-box-shadow: rgba(0,0,0,0.3) 0 0 4px;
  -moz-box-shadow: rgba(0,0,0,0.3) 0 0 4px;
  box-shadow: rgba(0,0,0,0.3) 0 0 4px;
}

.large-bg-1 {
  background: url(images/large-bg-1.jpg) repeat 0 0;
  background-repeat: no-repeat;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-attachment: fixed;
  background-position: 50% 0;
  position: relative;
  height: 294px;
  width: 100%;
}

我正在使用Parallax背景技术(当背景似乎比页面的其余部分滚动得慢)。但无论我在固定菜单中添加多少z-index,它仍会被它们隐藏。

我该如何解决这个问题?

以下是实际网站:http://www.hfwebdesign.com/?ModPagespeed=off

1 个答案:

答案 0 :(得分:1)

将其他元素的z-index设置为-1