Home >Web Front-end >HTML Tutorial >css controls fixed header, compatible with row and column merging_html/css_WEB-ITnose
The report table design designed in the project has relatively too many columns. When dragging the scroll bar below, it cannot correspond to the column corresponding to the table header, so I searched online for a long time, and finally I found some reference materials on the Internet, and then summarized a fixed header demo that is compatible with row and column merging.
Multiple browsers have not done much testing, and it has been tested in ie6.
I have been waiting for this function for a long time and finally found a solution today. I have summarized it in javaeye for easy reference in the future. There may be better implementation methods. I hope some experts will pass by and leave me some better implementation examples for future communication.
The following is the relevant css
Html code
列头 | 列头 | 列头 | |||
---|---|---|---|---|---|
h1 | h2 | h3 | h4 | h5 | |
| 单元格2 | 单元格3 | 单元格4 | 单元格5 | 单元格5 |
| 单元格2 | 单元格3 | 单元格4 | 单元格5 | 单元格5 |
| 单元格2 | 单元格3 | 单元格4 | 单元格5 | 单元格5 |
| 单元格2 | 单元格3 | Cell 4 | Cell 5 | Cell 5 |
Cell 2 | Cell 3Cell 4 | Cell 5||||
Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 5 | |
| Cell 2 | Cell 3 | Cell 4 | Cell 5 | |