2 and 3 then wrap a 4. How can this 4 be absolutely positioned at bottom 0? Inside this 4, 2 and 3 are in a document stream that is wrapped by itself. If 3 is not there, then 2 can support this 4. Is this consistent?
Write logical judgment in js. When 3 is hidden, the positioning top of 2 becomes the positioning top of 3. Ordinary document flow cannot realize automatic drop because the document flow is from left to right and top to bottom. The premise of this situation is that when the height of box 1 is fixed
If your 1 is a parent box, then the two 3's inside are subset boxes. You only need to give the height of 2 and 3 or the content inside to support them, and then they can be hidden as 3. When the time comes, you can naturally move it down
2 and 3 then wrap a 4. How can this 4 be absolutely positioned at bottom 0? Inside this 4, 2 and 3 are in a document stream that is wrapped by itself. If 3 is not there, then 2 can support this 4. Is this consistent?
Write logical judgment in js. When 3 is hidden, the positioning top of 2 becomes the positioning top of 3. Ordinary document flow cannot realize automatic drop because the document flow is from left to right and top to bottom. The premise of this situation is that when the height of box 1 is fixed
If your 1 is a parent box, then the two 3's inside are subset boxes. You only need to give the height of 2 and 3 or the content inside to support them, and then they can be hidden as 3. When the time comes, you can naturally move it down
Use flex
Try flex layout?
http://www.ruanyifeng.com/blo...
flex layout