如何防止coffee.jpg出现在payme.png背后?我第一次加载网页时得到的结果都是图片,但是一旦我们循环浏览咖啡图片后,咖啡图片就不会再出现。显示当前透明背景背后的轨道图像
这是相对的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>
和orbit.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;
}