我在让轮播中的图像与另一个 div 重叠时遇到了一个小问题。 click here
如果您单击红色选项卡,我会尝试将瓶子的图像放在白色框 (#section1) 的顶部。我注意到当我从 .rslides
中删除 position:relative
时,旋转木马图像执行我想要它执行的操作,但是我放置在 #rslides1 中的背景图像
走在前面...
我已经调整了 z-index 属性,但是我仍然无法实现它。有没有人能解决这个问题?
最佳答案
当我将我的 css 属性更改为以下时,它起作用了:
#header{
max-width: 1018px;
min-width: 320px;
width: 100%;
margin: 0 auto;
z-index: 10;
position: relative;
}
.rslides {
list-style: none;
overflow: hidden;
width: 100%;
padding: 0;
margin-top: -275px;
float: left;
z-index: -1;
}
.rslides_tabs {
margin: 93px auto 0;
position: relative;
width: 100%;
max-width: 1011px;
z-index: 10;
}
关于html - 无法重叠 DIV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12183023/