Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title>????? </title>
<script type= "Text/javascript" src= "Https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js" ></ Script>
<style type= "Text/css" >
Body,ul,li {padding:0; margin:0}
Ul,li {List-style:none}
. img-scroll {position:relative; margin:20px auto; width:440px;}
. img-scroll. Prev,.img-scroll. Next {position:absolute; display:block; width:50px; height:100px; background-color:# 000;
top:0; Color: #FFF; Text-align:center; line-height:100px}
. img-scroll. prev {left:0}
. Img-scroll. Next {right:0}
. img-list {position:relative; width:320px; height:100px; margin-left:60px; Overflow:hidden}
. img-list ul {width:9999px;}
. img-list li {float:left; display:inline width:100px; margin-right:10px; height:100px; Background-color: #BDBDDF; Text-align:center; line-height:100px;}
</style>
<body>
<div class= "Img-scroll" >
<span class= "prev" >prev</span>
<span class= "Next" >next</span>
<div class= "Img-list" >
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</div>
</div>
<script type= "Text/javascript" >
function Dy_scroll (wraper,prev,next,img,speed,or)
{
var wraper = $ (wraper);
var prev = $ (prev);
var next = $ (next);
var img = $ (img). FIND (' ul ');
var w = img.find (' li '). Outerwidth (True);
var s = speed;
Next.Click (function ()
{
Img.animate ({' Margin-left ':-w},function ()
{
Img.find (' li '). EQ (0). Appendto (IMG);
Img.css ({' Margin-left ': 0});
});
});
Prev.click (function ()
{
Img.find (' Li:last '). Prependto (IMG);
Img.css ({' Margin-left ':-w});
Img.animate ({' Margin-left ': 0});
});
if (or = = True)
{
AD = SetInterval (function () {Next.Click ();},s*1000);
Wraper.hover (function () {clearinterval (AD);},function () {ad = SetInterval (function () {Next.Click ();},s*1000);});
}
}
Dy_scroll ('. Img-scroll ', '. Prev ', '. Next ', '. Img-list ', 3,false);
</script>
</body>