jquery焦点图 slideshow
代码很简单
XML/HTML Code
- <div id="slideshow">
- <ul class="slides">
- <li><img src="../zhoushan.jpg" width="620" height="320" alt="" /></li>
- <li><img src="../freejs.jpg" width="620" height="320" alt="freejs" /></li>
- <li><img src="../sanya.jpg" width="620" height="320" alt="" /></li>
- <li><img src="../dalian.jpg" width="620" height="320" alt="" /></li>
- </ul>
- <span class="arrow previous"></span>
- <span class="arrow next"></span>
- </div>
CSS Code
- body{
- color:#eee;
- background:url('img/bg.jpg') repeat-x #0c0d10;
- }
- #slideshow{
- background-color:#F5F5F5;
- border:1px solid #FFFFFF;
- height:340px;
- margin:20px auto;
- position:relative;
- width:640px;
- -moz-box-shadow:0 0 22px #111;
- -webkit-box-shadow:0 0 22px #111;
- box-shadow:0 0 22px #111;
- }
- #slideshow ul{
- height:320px;
- left:10px;
- list-style:none outside none;
- overflow:hidden;
- position:absolute;
- top:10px;
- width:620px;
- }
- #slideshow li{
- position:absolute;
- display:none;
- z-index:10;
- }
- #slideshow li:first-child{
- display:block;
- z-index:1000;
- }
- #slideshow .slideActive{
- z-index:1000;
- }
- #slideshow canvas{
- display:none;
- position:absolute;
- z-index:100;
- }
- #slideshow .arrow{
- height:86px;
- width:60px;
- position:absolute;
- background:url('img/arrows.png') no-repeat;
- top:50%;
- margin-top:-43px;
- cursor:pointer;
- z-index:5000;
- }
- #slideshow .previous{ background-position:left top;left:0;}
- #slideshow .previous:hover{ background-position:left bottombottom;}
- #slideshow .next{ background-position:rightright top;rightright:0;}
- #slideshow .next:hover{ background-position:rightright bottombottom;}
js文件比较大,请到演示页面查看源码
原文地址:http://www.freejs.net/article_jiaodiantu_56.html