as the title
div{
flex:1;
width:0;
}
What is the role of width:0 in ?
as the title
div{
flex:1;
width:0;
}
What is the role of width:0 in ?
if width, is not set, when the content size of the internal element exceeds the average allocated remaining space, the width of the element is equal to the content size, if width is set and the size of the width is less than the average allocated remaining space, the average allocated remaining space is taken.
when flex is set to 1, it is equivalent to the size of the remaining space = the width of the parent element, so the average size of the remaining space
is equal to the width of the parent element / the number of elements
directly setting width to 0 ensures that the width of the element is evenly divided into the width of the parent element
when the contents of the two elastic boxes are not the same height, the element width of the flex will have an unexpected proportional effect. Add the width attribute (any value) to achieve the desired scale effect
as shown in the picture, many chat bubbles have a small triangle pointing to the avatar. If it is a text bubble, you can use a small triangle of the same color as the chat bubble. But what about the picture? How to fill this small triangle with the b...
problem description take a look at the demo on the Internet are all nesting with div and then transform, but this does not support the emergence of borders, only borders should be how to draw? the environmental background of the problems and what me...
how to implement this layout with css. The height of the parent element is not fixed, and it adapts itself according to its contents. ...