Table with sticky header and resizable columns without using JQuery

后端 未结 4 2182
梦谈多话
梦谈多话 2021-02-13 10:44

All the solutions I\'ve seen to make a table with a sticky header and resizable columns seems to be using Jquery. I want a plain old solution using CSS only if possible. If CSS

4条回答
  •  萌比男神i
    2021-02-13 11:44

    Here is a solution using the CSS position: sticky attribute with resize: horizontal.

    The resizable table headers will show a small icon in the lower-right hand corner, that you can grab and resize. (Due to a bug in Chrome, it may be so small you can barely see it...so look closely.)

      
    
        
    
            
    header 1header 2header 3header 4header 5
    12345
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111
    11111

提交回复
热议问题