您好,登錄后才能下訂單哦!
源碼:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>無標題文檔</title>
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
- <style>
- /* CSS reset */
- body,div,dl,dt,dd,ul,ol,li,h2,h3,h4,h5,h6,h7,pre,form,fieldset,input,textarea,p,blockquote,th,td{ margin:0; padding:0; font-size:12px; font-family:"宋體";}
- table{ border-collapse:collapse; border-spacing:0;}
- fieldset,img{ border:0; display:block;}
- address,caption,cite,code,dfn,em,strong,th,var{ font-style:normal; font-weight:normal;}
- ol,ul{ list-style:none;}
- caption,th{ text-align:left;}
- h2,h3,h4,h5,h6,h7{ font-size:100%; font-weight:normal;}
- .scroll{ width:300px; height:110px; overflow:hidden; position:relative; margin:100px auto 0; border:1px solid #ccc;}
- .scroll ul{ position:absolute; width:3000px;}
- .scroll li{ float:left; padding:5px 0;}
- </style>
- </head>
- <body>
- <div class="scroll">
- <ul>
- <li><a href="#" target="_blank"><img src="p_w_picpaths/1-1.jpg" width="100" height="100"/></a></li>
- <li><a href="#" target="_blank"><img src="p_w_picpaths/1-2.jpg" width="100" height="100"/></a></li>
- <li><a href="#" target="_blank"><img src="p_w_picpaths/1-3.jpg" width="100" height="100"/></a></li>
- <li><a href="#" target="_blank"><img src="p_w_picpaths/1-4.jpg" width="100" height="100"/></a></li>
- <li><a href="#" target="_blank"><img src="p_w_picpaths/1-5.jpg" width="100" height="100"/></a></li>
- <li><a href="#" target="_blank"><img src="p_w_picpaths/1-6.jpg" width="100" height="100"/></a></li>
- </ul>
- </div>
- <script src="scroll.js"></script>
- <script type="text/javascript">
- function AutoPlay(){
- var _scroll = $(".scroll ul");
- _scroll.animate({marginLeft : "-100px"},1000,function(){
- _scroll.css({marginLeft : "0px"}).find("li:first").appendTo(this);
- });
- }
- jQuery(function(){
- var t = setInterval(function(){
- AutoPlay();
- },3000);
- $(".scroll").hover(function(){
- clearInterval(t);
- },function(){
- t = setInterval(function(){
- AutoPlay();
- },3000);
- })
- })
- </script>
- </body>
- </html>
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。