问题
I am learning to use CSS
flexbox and I would like to render a big image on the left and two small images stacked on top of each other. How can I do this using CSS
flexbox?
<div class="container">
<img class="image1" src="#" alt="null">
<img class="image1" src="#" alt="null">
<img class="image3" src="#" alt="null">
</div>
回答1:
I would do this like this:
.container {
display: flex;
}
.side {
display: flex;
flex-direction: column;
}
.image {
display: block;
margin: 5px;
}
<div class="container">
<img class="image" src="http://placehold.it/250x250" alt="null">
<div class="side">
<img class="image" src="http://placehold.it/120x90" alt="null">
<img class="image" src="http://placehold.it/120x150" alt="null">
</div>
</div>
来源:https://stackoverflow.com/questions/38319784/stacking-images-with-css-flexbox