
下载:s3sliderfull(内含完整示例)
使用说明:
第一步:引入JQ库与s3Slider.js
- <br />
- <script src="js/jquery.js" type="text/javascript"></script><br />
- <script src="js/s3Slider.js" type="text/javascript"></script><br />
第二步:建立如下的html结构
- </p>
- <div id="s3slider">
- <ul id="s3sliderContent">
- <li class="s3sliderImage">
- <img src="#" /><br />
- <span>Your text comes here</span>
- </li>
- <li class="s3sliderImage">
- <img src="#" /><br />
- <span>Your text comes here</span>
- </li>
- <div class="clear s3sliderImage"></div>
- </ul>
- </div>
- <p>
第三步:CSS样式
- <br />
- #s3slider {<br />
- width: 400px; /* important to be same as image width */<br />
- height: 300px; /* important to be same as image height */<br />
- position: relative; /* important */<br />
- overflow: hidden; /* important */<br />
- }</p>
- <p>#s3sliderContent {<br />
- width: 400px; /* important to be same as image width or wider */<br />
- position: absolute; /* important */<br />
- top: 0; /* important */<br />
- margin-left: 0; /* important */<br />
- }</p>
- <p>.s3sliderImage {<br />
- float: left; /* important */<br />
- position: relative; /* important */<br />
- display: none; /* important */<br />
- }</p>
- <p>.s3sliderImage span {<br />
- position: absolute; /* important */<br />
- left: 0;<br />
- font: 10px/15px Arial, Helvetica, sans-serif;<br />
- padding: 10px 13px;<br />
- width: 374px;<br />
- background-color: #000;<br />
- filter: alpha(opacity=70); /* here you can set the opacity of box with text */<br />
- -moz-opacity: 0.7; /* here you can set the opacity of box with text */<br />
- -khtml-opacity: 0.7; /* here you can set the opacity of box with text */<br />
- opacity: 0.7; /* here you can set the opacity of box with text */<br />
- color: #fff;<br />
- display: none; /* important */<br />
- top: 0;</p>
- <p> /*<br />
- if you put<br />
- top: 0; -> the box with text will be shown at the top of the image<br />
- if you put<br />
- bottom: 0; -> the box with text will be shown at the bottom of the image<br />
- */<br />
- }</p>
- <p>.clear {<br />
- clear: both;<br />
- }<br />
第四步:初始化插件
- <br />
- $(document).ready(function() {<br />
- $('#s3slider').s3Slider({<br />
- timeOut: 4000<br />
- });<br />
- });<br />
timeOut参数设置幻灯片切换时间,4000就是4秒。

Pingback: jquery插件大全(不断更新中) | ria之家--RIA三部曲:JQ、ext、flex