<div id="demo" style="position:absolute;z-index:3;top:160px;left:220px;overflow:auto;height:80px" onscroll="divcenter()">
<table border="1">
<tr>
<td id="td1">ttt</td>
<td>ttt</td>
<td>ttt</td>
</tr>
</table>
<table border="1" cellpadding="1">
<tr style="BACKGROUND-COLOR: black" id="tr1">
<td>asf</td>
<td>asfdd</td>
<td>ddasf</td>
</tr>
</table>
</div>
<table border="1">
<tr>
<td id="td1">ttt</td>
<td>ttt</td>
<td>ttt</td>
</tr>
</table>
<table border="1" cellpadding="1">
<tr style="BACKGROUND-COLOR: black" id="tr1">
<td>asf</td>
<td>asfdd</td>
<td>ddasf</td>
</tr>
</table>
</div>
解决方案 »
- Js中除法怎么写?
- jquery中获取table下的所有类型为text的input对象,谢谢
- 构造函数不初始化直接调用时赋值不行吗?
- window.open转入的页面,怎么避免刷新的时候出现"若要再次显示网页 web浏览器需要重新发送您以前提交的信息"这信息
- js问题,求帮助
- 求完整的javascript菜单(不被<select>等遮住)(iframe)
- 何谓“javascript 的DOM操作,它大概涉及哪些知识啊?!!”
- 打开新窗口并改变其大小、位置的语句,在IE5正常,在IE6下就不行,为啥
- 关于检测 组件 是否已安装?
- js能否制作游戏脚本
- 急!!如何用javascript实现渐变的彩虹字!!
- 急!各位高手请帮忙,用javascript如何屏蔽ctrl+c功能键------在线等
上面的CSS的意思就是采用绝对的,深度为3,顶为160,左为220位置显示
<div id="demo" style="overflow:auto;height:80px;width:100" onscroll="t0.style.pixelTop=scrollTop">
<table border="1" style="position:absolute" id=t0>
<tr>
<td id="td1">ttt</td>
<td>ttt</td>
<td>ttt</td>
</tr>
</table>
<table border="1" cellpadding="1" height="200" id=t1 style="position:absolute">
<tr id="tr1">
<td>asf</td>
<td>asfdd</td>
<td>ddasf</td>
</tr>
</table>
</div>
<script>
t1.style.pixelTop=t0.offsetTop+t0.offsetHeight
</script>
<table border="1" style="position:absolute;z-index:2;" bgcolor=#ff00ff width=100% id=t0>//没动
<tr>
<td id="td1">ttt</td>
<td>ttt中国人</td>
<td>ttt</td>
</tr>
</table>
<table border="1" cellpadding="1" height="200" bgcolor=#00ff00 width=100% id=t1 style="position:absolute;z-index:0;">//在动
<tr id="tr1">
<td>asf卡拉挖</td>
<td>asfdd</td>
<td>ddasf</td>
</tr>
</table>
</div>
<script>
t1.style.pixelTop=t0.offsetTop+t0.offsetHeight
</script>