<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<script type="text/javascript" src="js/jquery-1.7.js"></script>
<!-- <script type="text/javascript" src="js/station.main.js"></script> -->
<!-- 需要两个js一个是库文件一个是主文件 -->
<script>
//station.main.js --code
// JavaScript Document
function DY_scroll(wraper,prev,next,img,speed,or)
{
var wraper = jQuery(wraper);
var prev = jQuery(prev);
var next = jQuery(next);
var img = jQuery(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);});
}
}
jQuery(function(){
DY_scroll('.img-scroll','.next','.prev','.img-list',3,true);// true为自动播放,不加此参数或false就默认不自动
});
jQuery(function(){
jQuery(".login_btn").hover(function(){jQuery(this).removeClass("login_btn").addClass("login_btn_hover");},function(){jQuery(this).removeClass("login_btn_hover").addClass("login_btn");});
});
</script>
</head>
<body>
<style type="text/css">
.con_sunny_baby{border:1px solid #4babdb;}
.img-scroll { position:relative;padding:6px 0; border:1px solid #c6c6c6; border-top:0;}
.img-scroll .prev,.img-scroll .next { position:absolute; display:block; width:13px; height:18px; top:0; color:#FFF; text-align:center; margin-top:64px; cursor:pointer;}
.img-scroll .prev { left:10px;}
.img-scroll .next {right:10px;}
.img-list { position:relative; width:940px; height:120px; margin-left:30px; overflow:hidden;}
.img-list ul { width:9999px;}
.img-list li { float:left; display:inline; width:110px; margin-right:8px;}
</style>
<div class="img-scroll">
<span class="prev"><img id="ico_left" src="images/turn_left.jpg" width="13" height="18" /></span>
<span class="next"><img id="ico_right" src="images/turn_right.jpg" width="13" height="18" /></span>
<div class="img-list">
<ul style="margin-left:0;">
<li><a href="#"><img src="images/baby_1.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_2.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_3.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_4.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_5.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_6.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_1.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_2.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_3.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_4.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_5.jpg" width="110" height="122" /></a></li>
<li><a href="#"><img src="images/baby_6.jpg" width="110" height="122" /></a></li>
</ul>
</div>
</div>
</body>