How do I create an HTML table with a fixed/frozen left column and a scrollable body?

后端 未结 25 1531
有刺的猬
有刺的猬 2020-11-21 22:27

I need a simple solution. I know it\'s similar to some other questions, like:

  • HTML table with fixed headers and a fixed column?
  • How can I lock the fir
相关标签:
25条回答
  • 2020-11-21 23:29

    Add this in the head:

    <link rel="stylesheet" type="text/css" href="/path/to/easyscrolltable.css">
    <script src="/path/to/easyscrolltable.js"></script>
    

    Javascript:

    $('table.ytable').EasyScrollableTable({
        'top'  : 1,  
        'left' : 1,  
        'class': '',
        'width': '100%',
        'height': 'auto',
        'footer': false,
        'hover': true
    });
    
    0 讨论(0)
提交回复
热议问题