我正在使用responsiveSlides Slider,但在自動模式爲true之前它不工作。 我有如下代碼...ResponsiveSlides無法正常工作
JS代碼:
<script src="Scripts/responsiveslides.min.js" type="text/javascript"></script>
<script src="Scripts/responsiveslides.js" type="text/javascript"></script>
<link href="Styles/responsiveslides.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
(function() {
$("#slider").responsiveSlides({
maxwidth: 800,
speed: 500
});
});
</script>
這裏是CSS代碼:
<style type="text/css">
.rslides {
position: relative;
list-style: none;
overflow: hidden;
width: 100%;
padding: 0;
margin: 0;
}
.rslides li {
-webkit-backface-visibility: hidden;
position: absolute;
display: none;
width: 100%;
left: 0;
top: 0;
}
.rslides li:first-child {
position: relative;
display: block;
float: left;
}
.rslides img {
display: block;
height: auto;
float: left;
width: 100%;
border: 0;
}
</style>
這裏是HTML代碼:
<div id="wrapper">
<ul class="rslides" id="slider">
<li>
<img src="Images/slide1.png" alt=""></li>
<li>
<img src="Images/slide2.png" alt=""></li>
<li>
<img src="Images/slide3.png" alt=""></li>
<li>
<img src="Images/slide4.png" alt=""></li>
<li>
<img src="Images/slide5.png" alt=""></li>
</ul>
</div>
而且我也附加jquery.min.js版本是v1.8.3:
<script src="Scripts/jquery.min.js" type="text/javascript"></script>
而且我還沒有對css &的所有文件做任何改變,responseSlides文件的javascript,它們就像它一樣,並且我已經附上上面的文件。
我會嘗試的jsfiddle加入這個,所以我們可以從那裏 – Riskbreaker
這裏調試它是:[JSFiddle示例](http://jsfiddle.net/t6Q7t/) –