Poor Performance with tables in Internet Explorer 8 Standards Mode

后端 未结 6 619
鱼传尺愫
鱼传尺愫 2021-02-05 09:53

When using a table with a reasonable amount of data - 100 rows by 50 columns - I notice that IE8 performance degrades unacceptably (only in IE8 standards rendering mode). The CP

6条回答
  •  醉酒成梦
    2021-02-05 10:28

    Tables are really expensive with rendering, hence why people say you should never use them unless they are meant for tabular data. If you give the table widths, normally it speeds up the rendering time.

    In your case I see one improvement that can be made. Instead of adding event handlers to every row, use event bubbling and catch the mouse movements on the table level. This means instead of 50 event handlers being adding for mouseover, you add one.

    One way of doing it:

    
    
      
       
          IE8 Table Hover
       
      
      
        
    ~

    Awesome Table

    Running Example

提交回复
热议问题