嗨,我对滑块的位置有一些问题。它在他的持有人之外,在右边的某个地方。我很确定我在 CSS 中遗漏了一些东西,但不记得到底是什么。
HTML:
<div class="slider">
<div class="carousel">
<img src="css/images/img1.jpg" alt="" />
<img src="css/images/img1.jpg" alt="" />
<img src="css/images/img1.jpg" alt="" />
</div>
<div class="pagination">
</div>
</div>
CSS:
.slider { position: relative; width: 100%; }
.carousel img { width: 781px; display: block; }
.pagination { position: absolute; bottom: 10px; left: 10px; }
.pagination a { background: url(images/pagination.png) no-repeat 0 bottom; height: 12px; width: 12px; float: left; font-size: 0; line-height: 0; text-indent: -4000px; padding: 0 3px 0 0; }
.pagination a:hover,
.pagination a.selected { background-position: 0 0; }
jQuery:
$(function(){
$(".carousel").carouFredSel({
items: 1,
scroll: {
fx: "fade"
},
auto: 4000,
width:781,
pagination: ".pagination"
});
});
我发现了我错过的错误overflow:hidden