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

后端 未结 13 2242
攒了一身酷
攒了一身酷 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:50

    I ran across a site a few weeks back. This is a working example of the first column locked but it is not browser compatible with Firefox. I didn't do a lot of checking around but it seems it only works in IE. There are some notes the author provided along with it that you can read.

    Lock the First column: http://home.tampabay.rr.com/bmerkey/examples/locked-column-csv.html

    Let me know if you need the Javascript to lock the Table headers too.

提交回复
热议问题