CSS-Only Sticky Headers for Tables, Using ‘position: sticky’
What’s neat about this is that you get the effect of the static table headers by introducing a few lines of css. No jQuery, no weird css that breaks the semantic intent of the content, and no javascript handlers built off scroll events.
An excerpt from CSS-Only Sticky Headers for Tables, Using ‘position: sticky’