Mercurial > hgrepos > hgweb.cgi > 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 wrap: on
line diff
--- a/examples/common/default/default.css Tue Jan 05 13:46:37 2021 +0900 +++ b/examples/common/default/default.css Tue Jan 05 18:50:11 2021 +0900 @@ -301,6 +301,12 @@ div.lcto td:nth-child(3), /* title */ div.lcto td:nth-child(4) /* owner */ {max-width: 14em;} +/* https://curecode.jp/tech/css-table-position-sticky-with-background-border-vanished/ */ +div.dumptable table.dumpblogs th { + position: sticky; top: 0; z-index: 0; background: #fcf0f0; + border: 1px solid black; border-collapse: collapse; + background-clip: padding-box; +} table.dumpblogs tr.凍結 td:nth-child(n+2) {opacity: 0.5;} table.dumpblogs tr.凍結 td:last-child {opacity: 1.0; color: blue;}