我正在爲我的網頁使用nivoslider。圖像看起來一個接一個地溢出,直到頁面完全加載。這是我使用的CSS。我已嘗試overflow:hidden
屬性。但它沒有得到糾正。我該如何糾正?nivo滑塊溢出問題
CSS:
.nivoSlider {
position:relative;
}
.nivoSlider img {
position:absolute;
top:0px; overflow:hidden;
left:0px;
}
/* If an image is wrapped in a link */
.nivoSlider a.nivo-imageLink {
position:absolute;
top:0px;
left:0px;
width:500px;
height:100%;
border:0;
padding:0;
margin:0;
z-index:60;
display:none;
}
/* The slices in the Slider */
.nivo-slice {
display:block;
position:absolute;
z-index:50;
height:100%;
}
/* Caption styles */
.nivo-caption {
position:absolute;
left:0px;
bottom:0px;
background:#000;
color:#fff;
/*opacity:0.8; Overridden by captionOpacity setting */
width:100%;
z-index:89;
}
.nivo-caption p {
padding:5px;
margin:0;
}
/* Direction nav styles (e.g. Next & Prev) */
.nivo-directionNav a {
position:absolute;
top:45%;
z-index:99;
cursor:pointer;
}
.nivo-prevNav {
left:0px;
}
.nivo-nextNav {
right:0px;
}
/* Control nav styles (e.g. 1,2,3...) */
.nivo-controlNav a {
position:relative;
z-index:99;
cursor:pointer;
}
.nivo-controlNav a.active {
font-weight:bold;
}
HTML:
<div id="slider">
<img src="uploads/images/6431-45-york-st-kitchen-b.jpg" width="315" height="250" alt="" />
<img src="uploads/images/9931-45-york-st-front-a.jpg" width="315" height="250" alt="" />
<img src="uploads/images/8931-45-york-st-bed-1a.jpg" width="315" height="250" alt="" />
<img src="uploads/images/3931-45-york-st-bath-a.jpg" width="315" height="250" alt="" />
<img src="uploads/images/4031-45-york-st-study-a.jpg" width="315" height="250" alt="" />
<img src="uploads/images/7531-45-york-st-kitchen-a.jpg" width="315" height="250" alt="" />
<img src="uploads/images/1931-45-york-st-living-b.jpg" width="315" height="250" alt="" />
<img src="uploads/images/5531-45-york-st-foyer-a.jpg" width="315" height="250" alt="" />
</div>
也許看看HTML將是有益的? – 2012-01-02 11:26:23
請參閱我編輯的查詢。 – designersvsoft 2012-01-02 11:28:27