0
我想在div中有一些图像。只应显示一个图像。我用:位置:绝对和溢出:隐藏?
<div id="slideshow" style="width:600px;height:400px;position:absolute;overflow:hidden;"></div>
<img src="img3.png" width="600px" height="400px" id="img3" style="position:absolute;left:0px;">
<img src="img2.png" width="600px" height="400px" id="img2" style="position:absolute;left:600px;">
<img src="img1.png" width="600px" height="400px" id="img1" style="position:absolute;left:1200px;">
</div>
但图像溢出从div和可见。我该如何解决?
不是我知道你在css中选择的原因,但你为什么不漂浮这些图像,而不是让它们绝对定位? –
我该怎么做? (对不起,我是一个完整的初学者) – msbg