/** * A collection of popular layouts and patterns made with CSS (https://csslayout.io) * (c) 2019 - 2021 Nguyen Huu Phuoc */ import * as React from 'react'; import { Helmet } from 'react-helmet'; import RelatedPatterns from '../../components/RelatedPatterns'; import Pattern from '../../constants/Pattern'; import DetailsLayout from '../../layouts/DetailsLayout'; import Block from '../../placeholders/Block'; import BrowserFrame from '../../placeholders/BrowserFrame'; import Rectangle from '../../placeholders/Rectangle'; const Details: React.FC<{}> = () => { return (
Try to scroll the main content of table to see the header sticks to the top.
... `} css={` .header { /* Background color */ background-color: #ddd; /* Stick to the top */ position: sticky; top: 0; /* Displayed on top of other rows when scrolling */ z-index: 9999; } `} >
{ Array(3).fill(0).map((_, index) => { return ( ); }) } { Array(10).fill(0).map((_, row) => { return ( { Array(3).fill(0).map((__, col) => { return ( ); }) } ); }) }
); }; export default Details;