如何防止 coffee.jpg 出现在 payme.png 后面?我第一次加载网页时得到的结果是两个图像,但是在我循环浏览它们之后,一旦咖啡.jpg 不再出现在后面。
这是相对的 test.html
<div class="container">
<div id="featured">
<img src="these/payme.png" /> // has transparent background
<img src="these/coffee.jpg" /> // shows up behind payme.png
</div>
</div>
和轨道.css
.container {
position: absolute;
top: 50%;
left: 50%;
margin: -250px 0 0 -420px;
}
#featured {
width: 850px;
height: 425px;
background: rgba(0,0,0,0);
overflow: hidden;
}
#featured>img,
#featured>div,
#featured>a { display: none; }
div.orbit-wrapper {
width: 1px;
height: 1px;
position: relative;
}
div.orbit {
width: 1px;
height: 1px;
position: relative;
overflow: hidden
}
div.orbit>img {
position: absolute;
top: 0;
left: 0;
display: none;
}
div.orbit>a {
border: none;
position: absolute;
top: 0;
left: 0;
line-height: 0;
display: none;
}
.orbit>div {
position: absolute;
top: 0;
left: 0;
width: 850px;
height: 425px;
}