我已经看到这个问题以多种不同的方式提出,但我只是不明白答案,因为应用程序或场景似乎与我的不同。
基本上我的内容宽度为 940 像素,我想使用“画架”作为幻灯片的背景,但是画架图像在 940 像素的内容宽度之后延伸了大约 400 像素,导致水平滚动条显示在 940 像素 +画架宽度(400 像素) - 但我希望滚动条仅在内容为 940 像素或更少时显示 - 是否有一个简单的修复我忽略?
<div id="showcase">
<div class="content">
<div class="left">
<h1>Lidya Aaghia Tchakerian</h1>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
</p>
</div>
<div id="slideshowArea">
<div id="slideshow">
<ul class="bjqs">
<li><img src="images/slider1.jpg" width="326" height="534" alt="" /></li>
<li><img src="images/slider1.jpg" width="326" height="534" alt="" /></li>
<li><img src="images/slider1.jpg" width="326" height="534" alt="" /></li>
<li><img src="images/slider1.jpg" width="326" height="534" alt="" /></li>
</ul>
</div>
</div>
</div>
</div>
我的CSS:
/* showcase
------------------------------------------*/
#showcase {
position: relative;
padding: 40px 0 0 0;
height: 828px;
background: #fafafa;
border: 1px solid #d8d8d8;
}
#showcase .left {
position: absolute;
width: 388px;
top: 200px;
text-align: center;
}
#showcase .left h1 {
color: #cd6d6d;
}
#slideshowArea {
position: absolute;
width: 824px;
left: 495px;
height: 875px;
background: url('../images/easel.png') no-repeat;
}
#slideshow {
display: block;
position: relative;
left: 72px;
height: 534px;
width: 326px;
border: none;
top: 107px;
}
#slideshow ul {
position: relative;
z-index: 99;
width: 326px;
}
ul .traits {
padding: 0;
float: left;
margin: 10px 0 0 30px;
}
.traits li {
color: #fff;
float: left;
display: block;
margin-right: 25px;
padding: 6px 0 0 22px;
background: url('../images/checkbox.png') no-repeat 0 0;
height: 30px;
list-style: none;
}
非常感谢任何和所有帮助。
谢谢,内森
编辑:查看页面访问http://www.digicrest.com/lidya