我创建了一个站点,它可以在 Firefox 上运行,但不能在 IE 上运行,背景图像消失了,实际上似乎 div 消失了,也可能是 z-index 问题,请您帮忙:(
以下是HTML代码
<div id="wrapper">
<!-- Home -->
<div id="landing" class="panel">
<img src="images/bgmain_no_producer.jpg" class="bg" />
</div>
</div>
以下是CSS
#wrapper {
width: 90 % ;
/*float:left;*/
min - height: 100 % ;
height: auto!important;
height: 100 % ;
margin: 0 auto 0px auto;
}
.panel {
min - width: 100 % ;
height: 100 % ;
overflow - y: hidden;
overflow - x: hidden;
position: absolute;
margin - top: -150 % ;
margin - left: -5 % ;
background - color: #555555;
opacity: 0;
z-index:0;
-webkit-transition: opacity .6s ease-in-out;
-moz-transition: opacity .6s ease-in-out;
-o-transition: opacity .6s ease-in-out;
-ms-transition: opacity .6s ease-in-out;
transition: opacity .6s ease-in-out;
}
img.bg {
/* Set rules to fill background */
min-width: 250px;
left: 50%;
margin-left: -50%; /* 50% */
/* Set up proportionate scaling */
width: 100%;
height: auto;
/* Set up positioning */
position:absolute;
top: 0;
z-index:-999;
}