# 无缝滚动
效果图
![](https://box.kancloud.cn/87998e417dd03fb616a31496c306b7be_678x397.png)
~~~
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>table内容连续滚动</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
* {padding: 0; margin: 0};
td {height: 28px;};
</style>
</head>
<body bgcolor="#FFFFFF">
<div style="padding-top: 100px;">
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="4FBFF9">
<tr>
<td width="120" align="center">业务流水号</td>
<td width="130" align="center">业务名称</td>
<td width="150" align="center">申请企业名称</td>
<td width="100" align="center">申报日期</td>
<td width="100" align="center">办理状态</td>
</tr>
</table>
</div>
<div id="demo" style="overflow: hidden; height: 240;">
<div id="demo1">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="4FBFF9">
<tr>
<td width="120" align="center">201404020001</td>
<td width="130">测试业务</td>
<td width="150">申请企业名称</td>
<td width="100" align="center">2014-03-13</td>
<td width="100" align="center">在办</td>
</tr>
<tr>
<td align="center">201404020002</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020003</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020004</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020005</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020006</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020007</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020008</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020009</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020010</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020011</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020012</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020013</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020014</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020015</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020016</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020017</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020018</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020019</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
<tr>
<td align="center">201404020020</td>
<td>测试业务</td>
<td>申请企业名称</td>
<td align="center">2014-03-13</td>
<td align="center">在办</td>
</tr>
</table>
</div>
<div id="demo2"></div>
</div>
<script type="text/javascript">
var speed = 50;
demo2.innerHTML = demo1.innerHTML;
function Marquee() {
if (demo2.offsetTop - demo.scrollTop <= 0) {
demo.scrollTop -= demo1.offsetHeight;
} else {
demo.scrollTop++;
}
}
var MyMar = setInterval(Marquee, speed);
demo.onmouseover = function() {
clearInterval(MyMar);
}
demo.onmouseout = function() {
MyMar = setInterval(Marquee, speed);
}
</script>
</body>
</html>
~~~