Issue to scroll tbody on IE 9 (tbody's height = height-line)

前端 未结 2 1690
-上瘾入骨i
-上瘾入骨i 2021-01-20 00:28

Sorry for my bad English, I hope you\'re going to understand what I want to say...

I\'m trying to implement an HTML table which support scrolling of table bodies ind

2条回答
  •  庸人自扰
    2021-01-20 00:54

    Here is a shorter answer that allows you to scroll the table with a fixed header in ie9.

    Add a conditional div around the table

    
    
    ...
    

    Add the following styles for ie9

        .old_ie_wrapper {
            height: 500px;
            overflow: auto;
        }
    
            .old_ie_wrapper tbody {
                height: auto;
            }
    
            .old_ie_wrapper thead tr {
                position: absolute;
            }
    
            .old_ie_wrapper tbody tr:first-child {
                height: 67px;
                vertical-align: bottom;
            }
    

    You will have to adjust the heights and probably other properties based on your table.

    提交回复
    热议问题