首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

横向滚动条表头随着动,纵向滚动条,表头不动,求大神帮忙解答下。

2013-09-06 
横向滚动条表头跟着动,纵向滚动条,表头不动,求大神帮忙解答下。。div id selectday styleposition:ab

横向滚动条表头跟着动,纵向滚动条,表头不动,求大神帮忙解答下。。
<div id = "selectday" style="position:absolute; height:542px; width:500px;overflow-x:auto "> 
 <table id="tb0" width=800px;>
  <tr>
   <td width="80">a0</td>
   <td width="80">a1</td>
   <td width="80">a2</td>
   <td width="80">a3</td>
   <td width="80">a4</td>
   <td width="80">a5</td>
   <td width="80">a6</td>
   <td width="80">a7</td>
   <td width="80">a8</td>
   <td width="80">a9</td>
  </tr>
 </table>
<table id="tb1" width=800px;>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>


  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>


   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>


   <td width="80">99</td>
  </tr>
  <tr>
   <td width="80">00</td>
   <td width="80">11</td>
   <td width="80">22</td>
   <td width="80">33</td>
   <td width="80">44</td>
   <td width="80">55</td>
   <td width="80">66</td>
   <td width="80">77</td>
   <td width="80">88</td>
   <td width="80">99</td>
  </tr>
 </table>
</div>     
[解决办法]

引用:
 
我知道为什么不好用了
dDiv.onscroll=function()在我的页面没有执行。我看浏览器报出
cannot set property ‘onscroll’ of null 的错误。这是什么原因?

你直接把 #11 的代码保存成HTML文件
运行 


热点排行