s4
changeset 913:d252bf61f048
Table headers stays at the top of scroll view with position: sticky
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 05 Jan 2021 18:50:11 +0900 |
parents | 4f19add6f877 |
children | cfb6247a2266 |
files | examples/common/default/default.css |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/examples/common/default/default.css Tue Jan 05 13:46:37 2021 +0900 1.2 +++ b/examples/common/default/default.css Tue Jan 05 18:50:11 2021 +0900 1.3 @@ -301,6 +301,12 @@ 1.4 div.lcto td:nth-child(3), /* title */ 1.5 div.lcto td:nth-child(4) /* owner */ 1.6 {max-width: 14em;} 1.7 +/* https://curecode.jp/tech/css-table-position-sticky-with-background-border-vanished/ */ 1.8 +div.dumptable table.dumpblogs th { 1.9 + position: sticky; top: 0; z-index: 0; background: #fcf0f0; 1.10 + border: 1px solid black; border-collapse: collapse; 1.11 + background-clip: padding-box; 1.12 +} 1.13 1.14 table.dumpblogs tr.凍結 td:nth-child(n+2) {opacity: 0.5;} 1.15 table.dumpblogs tr.凍結 td:last-child {opacity: 1.0; color: blue;}