Table header to stay fixed at the top when user scrolls it out of view with jQuery

后端 未结 25 2140
悲&欢浪女
悲&欢浪女 2020-11-22 05:38

I am trying to design an HTML table where the header will stay at the top of the page when AND ONLY when the user scrolls it out of view. For example, the table may be 500

25条回答
  •  旧巷少年郎
    2020-11-22 06:31

    Fix your issue with this

    tbody {
      display: table-caption;
      height: 200px;
      caption-side: bottom;
      overflow: auto;
    }
    

提交回复
热议问题