JS——網頁圖片輪播特效

來源:互聯網
上載者:User

標籤:class   com   特效   網站   flow   ott   多個   city   line   

焦點圖輪播

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"><head> 3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4 <meta http-equiv="Content-Language" content="zh-CN"> 5 <meta name="Keywords" content="SuperSlide,jQuery焦點圖/投影片"> 6 <meta name="Description" content="SuperSlide 致力於解決網站大部分特效展示問題,使網站代碼規範整潔,方便維護更新。網站上常用的“焦點圖/投影片”、“Tab標籤切換”、“圖片滾動”、“無縫滾動”等等只需要一個SuperSlide即可解決!還可以多個SuperSlide組合創造更多效果"> 7 <title>SuperSlide - 焦點圖/投影片</title> 8 <script type="text/javascript" src="../jquery1.42.min.js"></script><script type="text/javascript" src="../jquery.SuperSlide.2.1.js"></script> 9 </head>10 11 <body>12 13 14 15         <style type="text/css">16         /* css 重設 */17         *{margin:0; padding:0; list-style:none; }18         body{ background:#fff; font:normal 12px/22px 宋體;  }19         img{ border:0;  }20         a{ text-decoration:none; color:#333;  }21 22         /* 本例子css */23         .slideBox{ width:450px; height:230px; overflow:hidden; position:relative; border:1px solid #ddd;  }24         .slideBox .hd{ height:15px; overflow:hidden; position:absolute; right:5px; bottom:5px; z-index:1; }25         .slideBox .hd ul{ overflow:hidden; zoom:1; float:left;  }26         .slideBox .hd ul li{ float:left; margin-right:2px;  width:15px; height:15px; line-height:14px; text-align:center; background:#fff; cursor:pointer; }27         .slideBox .hd ul li.on{ background:#f00; color:#fff; }28         .slideBox .bd{ position:relative; height:100%; z-index:0;   }29         .slideBox .bd li{ zoom:1; vertical-align:middle; }30         .slideBox .bd img{ width:450px; height:230px; display:block;  }31 32         /* 下面是前/後按鈕代碼,如果不需要刪除即可 */33         .slideBox .prev,34         .slideBox .next{ position:absolute; left:3%; top:50%; margin-top:-25px; display:block; width:32px; height:40px; background:url(images/slider-arrow.png) -110px 5px no-repeat; filter:alpha(opacity=50);opacity:0.5;   }35         .slideBox .next{ left:auto; right:3%; background-position:8px 5px; }36         .slideBox .prev:hover,37         .slideBox .next:hover{ filter:alpha(opacity=100);opacity:1;  }38         .slideBox .prevStop{ display:none;  }39         .slideBox .nextStop{ display:none;  }40 41         </style>42 43         <div id="slideBox" class="slideBox">44             <div class="hd">45                 <ul><li>1</li><li>2</li><li>3</li></ul>46             </div>47             <div class="bd">48                 <ul>49                     <li><a href="http://www.SuperSlide2.com" target="_blank"><img src="images/pic1.jpg" /></a></li>50                     <li><a href="http://www.SuperSlide2.com" target="_blank"><img src="images/pic2.jpg" /></a></li>51                     <li><a href="http://www.SuperSlide2.com" target="_blank"><img src="images/pic3.jpg" /></a></li>52                 </ul>53             </div>54 55             <!-- 下面是前/後按鈕代碼,如果不需要刪除即可 -->56             <a class="prev" href="javascript:void(0)"></a>57             <a class="next" href="javascript:void(0)"></a>58 59         </div>60 61         <script type="text/javascript">62         jQuery(".slideBox").slide({mainCell:".bd ul",autoPlay:true});63         </script>64 65 66 67 </body>68 </html>69 <script type="text/javascript">70 //百度統計代碼71 var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");72 document.write(unescape("%3Cscript src=‘" + _bdhmProtocol + "hm.baidu.com/h.js%3Fa630f96b6a9dd549675d26373853f7f1‘ type=‘text/javascript‘%3E%3C/script%3E"));73 </script>

這裡用的是大話主席寫的superslide架構,一個js特效的架構,能解決大部分輪播等問題。

附上superslide地址:http://www.superslide2.com/

JS——網頁圖片輪播特效

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.