How to freeze list header row while scrolling in SharePoint?
I've recently used the sticky headers library to add fixed headers to out of the box SharePoint list views. Works in both standard and quick mode in SharePoint Online. I put a link to the script in a Script Editor web part on the view where i want this functionality. I believe you can also add to the master page for cross site implementation.
This is from a previous post: