<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="关键字1,关键字2" />
<meta name="Description" content="描述信息" />
<title>水平循环滚动</title>
<!--CSS/JS-->
<style type="text/css">
*{margin:0;padding:0;}
ul,li{list-style:none;display:block;}
#scrollBox{background: #FFF;margin:40px auto;overflow:hidden;border: 1px dashed #CCC;width: 500px;}
#scrollBox #con1,#scrollBox #con2{float:left;margin-left:10px;}
#innerdiv {float: left;width: 800%;}
</style></head>
<body>
<!--div-->
<div >
<div >
<div >
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
<a href="#"><img src="" height="120" width="192"></a>
</div>
<div ></div>
</div>
</div>
<script type="text/javascript">
var area =('scrollBox');
var con1 = ('con1');
var con2 = ('con2');
=;
=0;
function scrollUp(){
if(>=){
=0;
}else{
+=5;
}
}
var time = 50;
var mytimer=setInterval(scrollUp,time);
area.οnmοuseοver=function(){
clearInterval(mytimer);
}
area.οnmοuseοut=function(){
mytimer=setInterval(scrollUp,time);
}
/*
var speed=10; //数字越大速度越慢
var tab=('scrollBox');
var tab1=('con1');
var tab2=('con2');
=;
function Marquee(){
if(<=0)
-=
else{
++;
}
}
var MyMar=setInterval(Marquee,speed);
tab.οnmοuseοver=function() {clearInterval(MyMar)};
tab.οnmοuseοut=function() {MyMar=setInterval(Marquee,speed)};
*/
</script>
</body>
</html>
转自:/caoleiCoding/p/