响应表逐列

时间:2017-03-30 11:34:50

标签: html responsive

我已经构建了一个响应表,就像在这个example中一样。它工作得很好,但我不希望所有元素都中断,我想按列拆分表。在全视图中意味着更多:

+----+----+----+----+
| A  | B  | C  | D  |    (TH)
+----+----+----+----+
| a  | b  | c  | d  |    (TR/TD)
+----+----+----+----+
| e  | f  | g  | h  |     (TR/TD)
+----+----+----+----+

在600像素上:

+----+----+----+
| A  | B  | C  | 
+----+----+----+
| a  | b  | c  |
+----+----+----+
| D     d      |
+----+----+----+
| e  | f  | g  |
+----+----+----+
| D     h      |
+----+----+----+

在400px上,我自动切换到此卡片视图:

+--------------+
| A     a      |
+--------------+
| B     b      |
+--------------+
| C     c      |
+--------------+
| D     d      |
+--------------+
+--------------+
| A     e      |
+--------------+
| B     f      |
+--------------+
| C     g      |
+--------------+
| D     h      |
+--------------+

有没有办法用meta标签和CSS做到这一点?

0 个答案:

没有答案