HTML table freezing principle, HTML table table freezes rows and columns

Reprinted from http://liyinlei.iteye.com/blog/2077714

This way of fixing rows and columns is only suitable for IE, and only for a small amount of data. When the amount of data is large, it is very resource-intensive

Freeze columns and rows perfectly

.FixedHeaderColumnsTableDiv

{

overflow: auto;

position: relative;

}

.FixedCell

{

position: relative;

top: expression(this.offsetParent.scrollTop);

left: expression(this.parentElement.offsetParent.scrollLeft);

z-index: 1800;

}

.FixedHeaderRow1

{

position: relative;

top: expression(this.offsetParent.scrollTop);

background-color: #ccc;

z-index: 300;

}

.FixedHeaderRow2

{

position: relative;

top: expression(this.offsetParent.scrollTop);

z-index: 290;

background-color:#ffccff;

}

.FixedDataColumn

{

position: relative;

left: expression(this.parentElement.offsetParent.parentElement.scrollLeft);

z-index: 200;

background-color: Aqua;

}

header1

header2

header3

header4

header5

header6

header7

header8

header9

header10

ss

ss

header16

header17dddddddddddd

col1

col2

col3

col4

col5

col6

col7

col8

col9

col10

col1

col2

col3

col4

col5

col6

col7

col8

col9

col10

col1

col2

col3

col4

col5

col6

col7

col8

col9

col10

col1

col2

col3

col4

col5

col6

col7

col8

col9

col10

col1

col2

col3

col4

col5

col6

col7

col8

col9

col10

col1

col2

col3

col4

col5

col6

col7

col8

col9

col10

col1

col2

col3

col4

col5

col6

col7

col8

col9

col10

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324147580&siteId=291194637