文字向上无缝滚动


<style>
#xiangshangdemo1{
height:auto;
text-align:left;

}
#xiangshangdemo2{
height:auto;
text-align:left;

}
#xiangshangdemo1  li{
list-style-type:none;
height:auto;
width:155px;
text-align:left;
}
#xiangshangdemo2  li{
list-style-type:none;
height:auto;
width:155px;
text-align:left;
padding-right:15px;
}
</style>

<div id="xiangshangdemo" style="overflow:hidden;height:145px;width:155px;margin-left:14px;">
<ul id="xiangshangdemo1"> 
<%set rs=server.CreateObject("Adodb.recordset")
 sql="select * from product where bigclassname='香江之窗'  order by ArticleID desc"
 rs.open sql,conn,1,1
 if rs.eof and rs.bof then
 response.Write"暂无内容"
 else
 do while not rs.eof%>
 <li><table cellpadding="0" cellspacing="0" border="0" width="155"><tr><td width="155" height="22"><img src="img/jiantou.jpg" align="absmiddle" />&nbsp;&nbsp;<a title="<%=rs("title")%>" href="Articleshow.asp?ArticleID=<%=rs("ArticleID")%>"><%=left(rs("Title"),20)%>...</a></td></tr></table></li>
 <%rs.movenext
 loop
 end if
 rs.close
 set rs=nothing%>
</ul>
<ul id="xiangshangdemo2"></ul>
</div>
<script>
var xiangshangspeed=40
var xiangshangdemo=document.getElementById("xiangshangdemo");
var xiangshangdemo2=document.getElementById("xiangshangdemo2");
var xiangshangdemo1=document.getElementById("xiangshangdemo1");
xiangshangdemo2.innerHTML=xiangshangdemo1.innerHTML
function xiangshangMarquee(){
if(xiangshangdemo2.offsetTop-xiangshangdemo.scrollTop<=0)
  xiangshangdemo.scrollTop-=xiangshangdemo1.offsetHeight
else{
  xiangshangdemo.scrollTop++
}
}
var xiangshangMyMar=setInterval(xiangshangMarquee,xiangshangspeed)
xiangshangdemo.οnmοuseοver=function() {clearInterval(xiangshangMyMar)}
xiangshangdemo.οnmοuseοut=function() {xiangshangMyMar=setInterval(xiangshangMarquee,xiangshangspeed)}
</script>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值