求一段图片滚动代码?多张图片依次在指定的灰色区域滚动,不会滚出灰色区域外!

 我来答
小古而倾乐29
2011-02-26 · TA获得超过1724个赞
知道小有建树答主
回答量:1614
采纳率:0%
帮助的人:312万
展开全部
t;
<title>滚动信息 - 51windows.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body
td
.titletd td
.datatd td
.td1
.td2
.td3
.td4
.td5
.td6
.td7
</style></head>
<body>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr class="titletd">
<td nowrap class="td1">产品名称</td>
<td nowrap class="td2">规格</td>
<td nowrap class="td3">产地</td>
<td nowrap class="td4">价格</td>
<td nowrap class="td5">单位</td>
<td nowrap class="td6">企业名称</td>
<td nowrap class="td7">日期</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<div id="A1">
<div id="A2">
<table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc" style="margin-top:-1px;">
<tbody class="datatd">
<tr>
<td nowrap class="td1">白银</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">3,465</td>
<td nowrap class="td5">元/公斤</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">锑</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">47,000</td>
<td nowrap class="td5">元/公斤</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">电解锰</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">12,700</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">铜升水</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">600</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">铜升水</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">300</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">电解铜</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">68,490</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">电解铝</td>
<td nowrap class="td2">A00</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">19,540</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">电解铅</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">12,000</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">电解锌</td>
<td nowrap class="td2">0#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">29,650</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">电解锌</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">27,900</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">无氧铜丝</td>
<td nowrap class="td2">Φ3mm</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">69,400</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">镍</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">315,000</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">锡</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">78,000</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">钴</td>
<td nowrap class="td2">1#</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">400,000</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">漆包线</td>
<td nowrap class="td2">0.1-2.5mm</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">75,540</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">MB超细镍粉</td>
<td nowrap class="td2">150~1000</td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">550</td>
<td nowrap class="td5">元/公斤</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">砷铜合金</td>
<td nowrap class="td2"> </td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">68,500</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-25</td>
</tr>

<tr>
<td nowrap class="td1">砷铜合金</td>
<td nowrap class="td2"> </td>
<td nowrap class="td3">#</td>
<td nowrap class="td4" align="right">68,500</td>
<td nowrap class="td5">元/吨</td>
<td nowrap class="td6">长江现货</td>
<td nowrap class="td7">2006-8-24</td>
</tr>

</tbody>
</table>

</div>
</div>
</td>
</tr>
</table>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr class="titletd">
<td nowrap class="td1">名称1</td>
<td nowrap class="td1">名称2</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<div id="B1">
<div id="B2">
<table width="160" border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc" style="margin-top:-1px;">
<tbody class="datatd">
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
<tr>
<td nowrap class="td1">1234567890</td><td nowrap class="td1">1234567890</td>
</tr>
</tbody>
</table>

</div>
</div>
</td>
</tr>
</table>
<SCRIPT language=JavaScript>
<!--
function _InitScroll(_S1,_S2,_W,_H,_T){
return "var marqueesHeight"+_S1+"="+_H+";var stopscroll"+_S1+"=false;var scrollElem"+_S1+"=document.getElementById('"+_S1+"');with(scrollElem"+_S1+")scrollElem"+_S1+".onmouseover=new Function('stopscroll"+_S1+"=true');scrollElem"+_S1+".onmouseout=new Function('stopscroll"+_S1+"=false');var preTop"+_S1+"=0; var currentTop"+_S1+"=0; var stoptime"+_S1+"=0;var leftElem"+_S2+"=document.getElementById('"+_S2+"');scrollElem"+_S1+".appendChild(leftElem"+_S2+".cloneNode(true));setTimeout('init_srolltext"+_S1+"()',"+_T+");function init_srolltext"+_S1+"()function scrollUp"+_S1+"()currentTop"+_S1+"+=1;if(currentTop"+_S1+"==(marqueesHeight"+_S1+"+1)) }else}}";
}

eval(_InitScroll("A1","A2",550,19*6,4000));
eval(_InitScroll("B1","B2",164,19*4,2000));

/*
A1,A2或B1,B2是滚动内容区域外的两个DIV的ID

<div id="B1">
<div id="B2">
_W为滚动内容的宽度
_H为滚动内容的高度,必须为单元格高度的整数倍,这里每个单元格是19px高
_T为滚动后每次停留言时间

CSode by 51windows.net
Email:51windows#gmail.com
2006-8-25
*/
//-->
</SCRIPT>
<pre style="color:green;">
/*
简单要说明:

A1,A2或B1,B2是滚动内容区域外的两个DIV的ID

_W为滚动内容的宽度
_H为滚动内容的高度,必须为单元格高度的整数倍,这里每个单元格是19px高
_T为滚动后每次停留言时间
Code by 51windows.net
Email:51windows#gmail.com
2006-8-25
*/
</pre>
</body>
</html>
wucongaizhu
2011-02-25 · TA获得超过256个赞
知道小有建树答主
回答量:158
采纳率:0%
帮助的人:119万
展开全部
你想让图片怎么滚动啊,详细描述一下,如果像网页滚动字幕一样 那就可以用
<marquee direction="right">向右动</marquee>
<marquee direction="left">向左动</marquee>
<marquee behavior="alternate">左右动</marquee>
<marquee behavior="alternate" scrollamount="移动速度">文字</marquee>
<marquee direction="up">向上动</marquee>
<marquee direction="down">向下动</marquee>
<marquee>一<ul>个<ul>一<ul>个<ul>字<ul>动<ul></marquee>
<marpuee behavior="alternate" direction="方向">左右,上下动</marquee>
<marpuee behavior="alternate" width="70">移动的字体长度</marquee>
<marpuee behavior="alternate" direction="right" width="400">这个几个你可以混合用</marquee>
追问
你看图片那里有个灰色区域我,就是图片在那个灰色区域中滚动,不会跑出这个区域外
追答
你把代码写在灰色区域内就可以了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式