| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 717 人关注过本帖
标题:连续滚动图片【求助】
只看楼主 加入收藏
酷酷的鱼
Rank: 1
等 级:新手上路
威 望:1
帖 子:472
专家分:0
注 册:2005-8-9
收藏
 问题点数:0 回复次数:3 
连续滚动图片【求助】

<style type="text/css"> <!-- body { background-color: #CCCCCC; } --> </style><%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <script type="text/javascript"> document.write('<table align=center width=775 border=0 cellpadding=0 cellspacing=0 style=BORDER-LEFT: #cccccc 1px solid;BORDER-RIGHT: #cccccc 1px solid>'); document.write(' <tr> '); document.write(' <td width=774 height=31 align=center class=border01 bgcolor=#FFFFFF>'); document.write(' <div id=demo style=overflow:hidden;width:750;align=center>'); document.write(' <table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 >'); document.write(' <tr>'); document.write(' <td valign=top bgcolor=ffffff id=marquePic1> '); document.write(' <table width=100% border=0 cellspacing=0 cellpadding=0>'); document.write(' <tr align=center> '); document.write(' <td><a href="http://www.zzcar.net/" target="new"><img src="images/logo1.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.china-car.org/" target="new"><img src="images/logo2.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://qipei.hc360.com/" target="new"><img src="images/logo3.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://sannajim.nease.net/" target="new"><img src="images/logo4.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.51xueche.com/" target="new"><img src="images/logo5.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.szcars.com/" target="new"><img src="images/logo6.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://945.sqradio.com/" target="new"><img src="images/logo7.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.xycmcar.com/" target="new"><img src="images/logo8.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.jiayouzhan.com.cn/" target="new"><img src="images/logo9.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://motor.icxo.com/" target="new"><img src="images/logo10.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.apmt-expo.com/" target="new"><img src="images/logo11.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.pcauto.com.cn/index.html" target="new"><img src="images/logo12.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.ad365.com/" target="new" target="new"><img src="images/logo13.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.1010.com/" target="new"><img src="images/logo14.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.scar.com.cn/" target="new"><img src="images/logo15.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.upfeeling.cn/" target="new"><img src="images/logo16.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.qpsj.com/" target="new"><img src="images/logo17.gif" width="88" height="31" border=0></a></td>'); document.write(' </tr>'); document.write(' </table>'); document.write(' </td>'); document.write(' <td id=marquePic2 valign=top></td>'); document.write(' </tr>'); document.write(' </table>'); document.write(' </div>'); document.write(' </td>'); document.write(' </tr>'); document.write(' </table>'); var speed=15 marquePic2.innerHTML=marquePic1.innerHTML function Marquee(){ if(demo.scrollLeft>=marquePic1.scrollWidth){ demo.scrollLeft=0 }else{ demo.scrollLeft++ } } var MyMar=setInterval(Marquee,speed) demo.onmouseover=function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}

</script> 这段代码要设置宽为775px,可是运行时发现左右两边各出现一道白边,请问如何去掉?

搜索更多相关主题的帖子: document write 滚动 style 
2005-09-20 10:22
suyongtao
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:33
帖 子:8674
专家分:127
注 册:2004-11-6
收藏
得分:0 
[CODE]

<style type="text/css"> <!-- body { background-color: #CCCCCC; } --> </style><%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <script type="text/javascript"> document.write('<table align=center width=775 border=0 cellpadding=0 cellspacing=0 style=BORDER-LEFT: #cccccc 1px solid;BORDER-RIGHT: #cccccc 1px solid>'); document.write(' <tr> '); document.write(' <td width=774 height=31 align=center class=border01 bgcolor=#FFFFFF>'); document.write(' <div id=demo style=overflow:hidden;width:750;align=center>'); document.write(' <table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 >'); document.write(' <tr>'); document.write(' <td valign=top bgcolor=ffffff id=marquePic1> '); document.write(' <table width=100% border=0 cellspacing=0 cellpadding=0>'); document.write(' <tr align=center> '); document.write(' <td><a href="http://www.zzcar.net/" target="new"><img src="images/logo1.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.china-car.org/" target="new"><img src="images/logo2.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://qipei.hc360.com/" target="new"><img src="images/logo3.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://sannajim.nease.net/" target="new"><img src="images/logo4.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.51xueche.com/" target="new"><img src="images/logo5.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.szcars.com/" target="new"><img src="images/logo6.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://945.sqradio.com/" target="new"><img src="images/logo7.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.xycmcar.com/" target="new"><img src="images/logo8.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.jiayouzhan.com.cn/" target="new"><img src="images/logo9.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://motor.icxo.com/" target="new"><img src="images/logo10.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.apmt-expo.com/" target="new"><img src="images/logo11.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.pcauto.com.cn/index.html" target="new"><img src="images/logo12.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.ad365.com/" target="new" target="new"><img src="images/logo13.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.1010.com/" target="new"><img src="images/logo14.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.scar.com.cn/" target="new"><img src="images/logo15.gif" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.upfeeling.cn/" target="new"><img src="images/logo16.jpg" width="88" height="31" border=0></a></td>'); document.write(' <td><a href="http://www.qpsj.com/" target="new"><img src="images/logo17.gif" width="88" height="31" border=0></a></td>'); document.write(' </tr>'); document.write(' </table>'); document.write(' </td>'); document.write(' <td id=marquePic2 valign=top></td>'); document.write(' </tr>'); document.write(' </table>'); document.write(' </div>'); document.write(' </td>'); document.write(' </tr>'); document.write(' </table>'); var speed=15 marquePic2.innerHTML=marquePic1.innerHTML function Marquee(){ if(demo.scrollLeft>=marquePic1.scrollWidth){ demo.scrollLeft=0 }else{ demo.scrollLeft++ } } var MyMar=setInterval(Marquee,speed) demo.onmouseover=function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}

</script> [/CODE]


面朝大海,春暖花开!
2005-09-20 16:11
suyongtao
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:33
帖 子:8674
专家分:127
注 册:2004-11-6
收藏
得分:0 
把滚动的宽度改宽一下就可以了..

面朝大海,春暖花开!
2005-09-20 16:12
酷酷的鱼
Rank: 1
等 级:新手上路
威 望:1
帖 子:472
专家分:0
注 册:2005-8-9
收藏
得分:0 
怎么修改?我要求的宽度就是775px

2005-09-26 09:00
快速回复:连续滚动图片【求助】
数据加载中...
 
   



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

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