K
K
kaleon2019-11-30 17:29:26
Flexbox
kaleon, 2019-11-30 17:29:26

How to make a list for this layout?

Sandbox (view in viewport 768px):
codesandbox.io/s/create-react-app-22jzx
or
https://codesandbox.io/s/create-react-app-zi92t
Requires mapped arrays with "squares" (this is in perspective there will be images, approximately 20x20 + - 2px) and structure the text on the page under the layout
5de28b2e2aaba245007087.png
. For example, when the layout has 3 elements per line, instead of four, you need to somehow specify a break. In addition, I have inline columns, so to speak, but I don’t understand, I need to do it randomly .
How to implement this without crutch assignment of width by key to each element?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VegasChickiChicki, 2019-11-30
@VegasChickiChicki

display: flex;
justify-content: flex-start;
align-items: flex-start;

//именно это свойство сделает перенос на новую строчку, если места элементам не хватает
flex-wrap: wrap
//именно это свойство сделает перенос на новую строчку, если места элементам не хватает

ps there may be errors, I can’t do it without auto-substitution yet>.<
If, of course, I correctly understood what the problem is ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question