How to display tables on mobile using Bootstrap?

前端 未结 4 1008
傲寒
傲寒 2021-01-30 03:47

My tables display fine on desktop, but once I try to view the mobile version my table ends up being too wide for the mobile device screen. I am using a responsive layout.

<
4条回答
  •  一生所求
    2021-01-30 04:18

    Bootstrap 3 introduces responsive tables:

    ...

    Bootstrap 4 is similar, but with more control via some new classes:

    ...responsive across all viewports ... with .table-responsive. Or, pick a maximum breakpoint with which to have a responsive table up to by using .table-responsive{-sm|-md|-lg|-xl}.

    Credit to Jason Bradley for providing an example:

    Responsive Tables

提交回复
热议问题