Responsive table by columns

后端 未结 5 808
花落未央
花落未央 2021-01-02 06:41

I have a table with four columns and I need to have a responsive table where each column will be below the other but I don\'t know how to do it. I hope that there is some an

5条回答
  •  太阳男子
    2021-01-02 06:56

    The best way to do this would be with divs and using CSS' display: table, display: table-row and display: table-cell properties, along with some breakpoints. Otherwise, you're going to have a lot of ugly code. This isn't the semantically greatest solution, but as far as responsive goes, it does work.

    See this excellent article for more help: http://css-tricks.com/almanac/properties/d/display/.

提交回复
热议问题