我正在努力让Unslider工作 - 现在它是一个彼此重叠的图像列表..
HTML:
<div id="main">
<div class="slider">
<ul>
<li><img src="images/slider1.jpg" /></li>
<li><img src="images/slider2.jpg" /></li>
<li><img src="images/slider3.jpg" /></li>
</ul>
</div>
</div>
CSS:
main {max-width:900px;
margin-left:auto;
margin-right:auto;}
.slider { position: relative; overflow: auto; width:900px;}
.slider li { list-style: none; }
.slider ul li { float: left; }
ul {padding: 0;
margin: 0;}
答案 0 :(得分:1)
答案 1 :(得分:1)
试试这个:
$(document).ready(function() {
$( ".slider img:first" ).load(function() {
$('.slider').unslider({
speed: 700,
delay: 5000,
complete: function() {},
keys: true,
dots: false,
fluid: false,
});
});
});