怎样修改代码可以使下面的代码图片由纵向滚动显示变为横向从左到右滚动显示,请教各位了,急急急!
<div id=demo style="OVERFLOW: hidden; WIDTH: 160px; COLOR: #ffffff; HEIGHT: 240px">
<div id=demo1>
<center>
<%
set rs=conn.execute("select top 6 * from photo order by addtime desc")
do while not rs.eof
%>
<a href="photo_browse.asp?id=<%=rs("id")%>"><img src="picslt/<%=rs("picslt")%>" width="90" height="120"></a>
<%
rs.movenext
loop
rs.close()
set rs = nothing
%>
</center>
</div>
<div id=demo2></div>
</div>
<SCRIPT Language="JavaScript">
demo2.innerHTML = demo1.innerHTML; //克隆demo1为demo2
var speed = 30; //滚动速度,数字越小速度越快
function Marquee(){
//内容滚动主函数
if(demo2.offsetTop-demo.scrollTop<=0){
//当滚动至demo1与demo2交界时
demo.scrollTop-=demo1.offsetHeight; //demo跳到最顶端
}else{
demo.scrollTop++;
}
initialize();
}
function initialize(){
timer = setTimeout("Marquee()", speed);
}
function StopMarquee(){
clearInterval(timer);
//清除定时器达到滚动停止的目的
}
initialize();
demo.onmouseover=StopMarquee //鼠标移上时清除定时器达到滚动停止的目的
demo.onmouseout=initialize //鼠标移开时重设定时器
</SCRIPT>