我试图显示背景图像下面两个div
s与background-color
属性。 我尝试玩z-index
和position: relative
但迄今没有成功。 图片在这两个div
s下面不可见。下面的背景图像与背景色属性
CSS:
.bgImage {
background-image: url('../images/footer_bg.png');
background-repeat: no-repeat;
background-position: top center;
z-index: 999;
position: relative;
}
footer .bgColor1 {
background-color: #3E3E3E;
min-height: 223px;
overflow: hidden;
z-index: 0;
position: relative;
}
footer .bgColor2 {
background-color: #819808;
min-height: 223px;
overflow: hidden;
z-index: 0;
position: relative;
}
HTML:
<footer class="bgImage">
<div class="bgColor1"></div>
<div class="bgColor2"></div>
</footer>