How can I lock the first row and first column of a table when scrolling, possibly using JavaScript and CSS?

后端 未结 13 2246
攒了一身酷
攒了一身酷 2020-11-27 03:11

How can I create a table that has its first row and first column both locked, as in Excel, when you activate \'freeze panes\'? I need the table to both scroll horizontally

13条回答
  •  我在风中等你
    2020-11-27 03:48

    Sort and Lock Table is the only solution I have seen which does work on other browsers than IE. (although this "locked column css" might do the trick as well). Required code block below.

    
    
    
      
      
      
      
        
      
    
      
    
    
    
      
    NAME Amt Lvl Rank Position Date
    Maha $19,923.19 100 100 Owner 01/02/2001
    Thrawl $9,550 159 100% Co-Owner 11/07/2003
    Marhanen $223.04 83 99% Banker 06/27/2006
    Peter $121 567 23423% FishHead 06/06/2006
    Jones $15 11 15% Bubba 10/27/2005
    Supa-De-Dupa $145 91 32% momma 12/15/1996
    ClickClock $1,213 23 1% Dada 1/30/1998
    Mrs. Robinson $99 99 99% Wife 07/04/1963
    Maha $19,923.19 100 100% Owner 01/02/2001
    Thrawl $9,550 159 100% Co-Owner 11/07/2003
    Marhanen $223.04 83 59% Banker 06/27/2006
    Peter $121 567 534.23% FishHead 06/06/2006
    Jones $15 11 15% Bubba 10/27/2005
    Supa-De-Dupa $145 91 42% momma 12/15/1996
    ClickClock $1,213 23 2% Dada 1/30/1998
    Mrs. Robinson $99 99 (-10.42%) Wife 07/04/1963
    Maha -$19,923.19 100 (-10.01%) Owner 01/02/2001
    Thrawl $9,550 159 -10.20% Co-Owner 11/07/2003
    TOTAL: 999999 9999999 99

提交回复
热议问题