| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 603 人关注过本帖
标题:我的图片不能连续滚动,是什么问题
只看楼主 加入收藏
mimi060828
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2014-1-9
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:1 
我的图片不能连续滚动,是什么问题
<table width="800" height="134" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><style type="text/css">
<!--
#demo {
background: #FFF;
overflow:hidden;
width: 800px;
}
#demo img {

}
#indemo {
float: left;
width: 800%;
}
#demo1 {
float: left;
}
#demo2 {
float: left;
}
-->
</style>
<div id="demo">
<div id="indemo">
 <%
    set rs=server.CreateObject("adodb.recordset")
    sql="select top 5 * from tab_chanpin where hot=1 order by o_orders desc"
    rs.open sql,conn,1,1
    i=0
    while not rs.eof and not rs.bof
    if rs("pic_url")<>"" then
         pic_url=rs("pic_url")
            else
               pic_url="../bookpic/nopic.gif"
           end if
 %>
<div id="demo1">
<table width="200" height="127" border="0" cellpadding="0" cellspacing="0">
 <tr>
   <td width="8" height="8"></td>
   <td height="8"></td>
   <td width="7" height="8"></td>
 </tr>
 <tr>
   <td  width="8"></td>
   <td height="90" align="center">
    <a href="detail_pro.asp?id=<%=rs("id")%>"><img src="<%=replace(pic_url,"../","")%>" alt=""  border="0" onload="javascript:DrawImage(this,220,160);"></a>
   </td>
   <td width="7"></td>
  </tr>
  <tr>
    <td></td>
    <td height="8" ></td>
    <td></td>
  </tr>
 </table>
 <table width="200" border="0" cellspacing="0" cellpadding="0">
   <tr>
      <td height="5"></td>
   </tr>
   <tr>
     <td height="24" align="center"><a class="link_black" href="detail_pro.asp?id=<%=rs("id")%>"><%=Left((rs("name")),20)%></a></td>
   </tr>
   <tr>
      <td align="center">&nbsp;</td>
   </tr>
 </table>
</div>
<%
rs.movenext
i=i+1
if i=4 then
i=0
%>
<div id="demo2"></div>
<%
end if
wend
rs.close
set rs=nothing
%>
</div>

</div>
<script>
<!--
var speed=30;
var tab=document.getElementById("demo");
var tab1=document.getElementById("demo1");
var tab2=document.getElementById("demo2");
tab2.innerHTML=tab1.innerHTML;
function Marquee(){
if(tab2.offsetWidth-tab.scrollLeft<=0)
tab.scrollLeft-=tab1.offsetWidth
else{
tab.scrollLeft++;
}
}
var MyMar=setInterval(Marquee,speed);
tab.onmouseover=function() {clearInterval(MyMar)};
tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};
-->
</script></td>
  </tr>
</table>
搜索更多相关主题的帖子: background border center hidden style 
2014-01-09 17:14
kingfangden
Rank: 4
来 自:深圳
等 级:贵宾
威 望:11
帖 子:57
专家分:279
注 册:2013-12-20
收藏
得分:14 
这个我也遇到过很多次。但是都不记得是怎么解决的。www.发个相同的案例看看吧。

做一个好的Asp人员,做一个好的互联网公司!
公司官网---www-xhxit-com
个人日记---www-dengshifang-cn
仕方文章管理系统---www-4fwen-com
2014-01-11 22:51
快速回复:我的图片不能连续滚动,是什么问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016833 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved