javascript - The right column has a fixed width, and the left column is adaptive and has a minimum width
phpcn_u15822017-05-31 10:39:00
0
3
987
The right column has a fixed width and the left column is adaptive. However, when the window shrinks to a certain extent, the left column will no longer become smaller. If I want to achieve this effect, how should I lay it out?
.con(.l,.r) .con display:flex; flex-wrap:nowrap; width:100%; height:xpx; .l .... .r ... .. You should be able to understand it But it’s up to you to set the fixed width flex is actually better to use proportions
The min-width of your left column: 300px; of course it will not get smaller. In fact, the simplest way to write it is:
And is this the problem? Why don't you see the problem?
Follow up:
This should meet your needs, but I don’t know how you want to present the final size less than 900px, so I just use the scroll bar
.con(.l,.r)
.con
display:flex;
flex-wrap:nowrap;
width:100%;
height:xpx;
.l
....
.r
... ..
You should be able to understand it
But it’s up to you to set the fixed width
flex is actually better to use proportions