容器div:
#header{
background:#190000;
width:1024px;
height:216px;
}
幻灯片div:
.slideshow {
float:left;
height: 216px;
width: 1023px;
margin-top:-192px;
overflow:hidden;
z-index:1;
}
.slideshow img {
padding: 0 0 0 0;
height:216px;
width:1023px;
border: none;
}
答案 0 :(得分:0)
是的,确实如此。您的负边距正在将您的.slideshow
容器移动192px,这使它基本上不可见。每张图片只显示24px:
216px height - 192px margin = 24px visible
如果从CSS中删除负上边距,它将正确显示:
.slideshow {
float:left;
height: 216px;
width: 1023px;
overflow:hidden;
z-index:1;
}