0
所以我有這兩行div divs與圖像jsfiddle 你可以看到,他們對齊,但在右側,當你調整窗口的頂部或底部將伸出。我希望它們能夠在兩邊對齊。我如何解決它?如何對齊兩行圖像
<div class="latest_wrapper">
<div class="latest_item"><img src="http://www.yenmag.net/wp-content/uploads/2013/09/Grumpy-Cat-thumbnail-190x190.jpg" alt="Men"></div>
<div class="latest_item"><img src="http://www.yenmag.net/wp-content/uploads/2013/09/Grumpy-Cat-thumbnail-190x190.jpg" alt="Women"></div>
<div class="latest_item"><img src="http://www.yenmag.net/wp-content/uploads/2013/09/Grumpy-Cat-thumbnail-190x190.jpg" alt="Watches"></div>
<div class="latest_item bigger"><img src="http://31.media.tumblr.com/565b1f797c19420c4d5b89de430751cb/tumblr_inline_nilvxaeMRt1rzpxo3.jpg" alt="40 % off"></div>
<div class="latest_item bigger"><img src="http://31.media.tumblr.com/565b1f797c19420c4d5b89de430751cb/tumblr_inline_nilvxaeMRt1rzpxo3.jpg" alt="Sales"></div>
</div>
.latest_wrapper {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
img {
max-width: 100%;
height: auto;
}
.bigger {
width: 45%;
margin-right: 5%;
}
.bigger:last-child {
margin-right: 0;
}
這是你在找什麼https://jsfiddle.net/n943dwb9/7/? –