如何实现图片不间断向上滚动?

lzr850825 2008-01-12 02:56:45
代码如下:
<marquee scrollamount="2" scrolldelay="100" direction=up onmouseout=this.start() onmouseover=this.stop() height=380>
<table width="125" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#006699">
<tr>
<td width="125" height="38"><div align="center"><img src="images/youqing-1.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-2.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-3.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-4.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-5.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-6.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-7.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-8.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-9.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"> <img src="images/youqing-10.gif" width="125" height="38"></div></td>
</tr>
</table>
</marquee>
还有,如何实现table细线边框及其颜色的设置?
...全文
1876 点赞 收藏 10
写回复
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
布丁西西 2011-11-16
marquee默认就是往左滚动的,什么属性也不用设置,我遇到的问题是marquee中的图片模糊,希望大家支支招,看是怎么回事,下午运行时还是清晰的,晚上就不行了,是不是网页过期的原因????等待中。。。。。
回复
KOBACK 2011-09-23
图片不间断向上滚动?你这不是扯蛋吗?你实现不间断了吗?最多只能算重复向上滚动,但绝不是不间断,滚动的时候屁股还带着一大段空白呢!
回复
lzr850825 2008-01-12
不在么?有其他人知道的呒?来帮忙回答下~
回复
lzr850825 2008-01-12
能不能具体说明啊?
把详细代码附上,按问题一,二回答~先谢拉~
回复
一品梅 2008-01-12
如何实现table细线边框及其颜色的设置?
-------------------------------
marquees td{
border
...

}
回复
tjch 2008-01-12
你好,请问有没有水平滚动的或向左不间段滚动的?盼回复!!谢谢!
回复
lzr850825 2008-01-12
怎么实现上述代码之后,垂直滚动条在网页下方拉出很大一个空白区域,怎么处理啊?
回复
lzr850825 2008-01-12
可以滚动,但有点问题:
问题一:
我的table是放在另外一个table的某行tr(该行为:1*1,也就是只有一个td)的td中,完整代码是:
<tr>
<td height="70" valign="top">


<div id="marquees">
<table width="125" border="0" align="center" cellpadding="0" cellspacing="3" bordercolor="red">
<tr>
<td width="125" height="38"><div align="center"><img src="images/youqing-1.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-2.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-3.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-4.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-5.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-6.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-7.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-8.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"><img src="images/youqing-9.gif" width="125" height="38"></div></td>
</tr>
<tr>
<td width="125" height="38"> <div align="center"> <img src="images/youqing-10.gif" width="125" height="38"></div></td>
</tr>
</table>
</div>


</td>
</tr>
代码运行后,div层滚动区域不在上述代码的table位置显示,而是在上面所说的某行<tr>的<td>最左上角位置,而且,滚动区域的高度不是所想的380px,
原来的设想是:在table所在位置设置滚动区域,即滚动区域为width:125px height:380px;而且该滚动区域在td中为居中显示.
问题二:table的细线边框好象没有显示啊??颜色好象也没有.是不是还要设置什么标签的属性???
回复
vivianshi 2008-01-12
以下是实现的图片不间断向上滚动代码和table细线边框及颜色的设置:


<div id="marquees">
<table width="130" height="615" border="0" cellpadding="0" cellspacing="1" bgcolor="#006699">
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-1.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-2.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-3.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-4.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-5.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-6.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-7.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-8.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center"> <img src="images/youqing-9.gif" width="125" height="38"> </div></td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"><div align="center">   <img src="images/youqing-10.gif" width="125" height="38" /> </div></td>
</tr>
</table>
</div>
<script language="JavaScript">
marqueesHeight=380;
stopscroll=false;
with(marquees){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');

preTop=0; currentTop=0;

function init(){
templayer.innerHTML="";
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
setInterval("scrollUp()",80);
}
document.body.onload=init;

function scrollUp(){
if(stopscroll==true) return;
preTop=marquees.scrollTop;
marquees.scrollTop+=1;
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
marquees.scrollTop+=1;
}
}
</script>
回复
vivianshi 2008-01-12

下而如何实现table细线边框及颜色的设置:
<marquee scrollamount="2" scrolldelay="100" direction=up onmouseout=this.start() onmouseover=this.stop() height=380>
<table width="130" height="615" border="0" cellpadding="0" cellspacing="1" bgcolor="#006699">
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-1.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-2.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-3.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-4.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-5.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-6.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-7.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-8.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center"> <img src="images/youqing-9.gif" width="125" height="38"> </div> </td>
</tr>
<tr>
<td width="125" height="38" bgcolor="#FFFFFF"> <div align="center">   <img src="images/youqing-10.gif" width="125" height="38" /> </div> </td>
</tr>
</table>
</marquee>
回复
发动态
发帖子
CSS
创建于2007-09-28

5.9w+

社区成员

层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
申请成为版主
社区公告
暂无公告