我正试着做一个有React的部分。
这是我希望它在桌面中的样子:
+---+---+---+--------------+
| 3 | 2 | 1 | A | <- this is right one
+---+---+---+--------------+
这是它在移动的视图中的外观:
+-----------+
| A |
+---+---+---+ <- this is right one
| 3 | 2 | 1 |
+---+---+---+
我也尝试过一些教程,但每次都是这样:
+-----------+
| A |
+-----------+
| 1 |
+-----------+ <- this is wrong one
| 2 |
+-----------+
| 3 |
+-----------+
希望形象化能有所帮助。
我试着做一个有两栏的部分。第一栏有字母在里面。第二栏有一个有三栏的内部部分,每一栏有一个数字在里面。
3条答案
按热度按时间cbjzeqam1#
可以用网格来完成。
一种方法是制作嵌套网格,但如果您精确地指定起点和终点位置,则会更简单。
7ivaypg92#
给你:
超文本:
CSS:
您可以根据需要更改介质查询。
esyap4oy3#
使用媒体屏幕和Flexbox
HTML代码
CSS代码