enter image description here
我试图对齐右边角落的绿色边框框,但没有成功,难道没有人有一个想法吗?
.gallery {
display: flex;
height: 480px;
width: 1170px;
position: relative;
flex-wrap: wrap;
outline: 3px solid black;
margin: 50px auto 0;
}
.gallery .column:last-child {
width: 770px;
height: 224px;
display: flex;
justify-content: flex-start;
border: 3px solid green;
}
.gallery .column:last-child .box {
height: 224px;
width: 770px;
}
<div class="gallery">
<div class="column">
<div class="box">
<div class="suggested-text">
<h2>Quae ab illo inventore</h2>
<p>Architecto beatae vitae dicta sunt</p>
<button type="button">Shop now</button>
</div>
<img src="img/Bitmaplaptops.png" alt="">
</div>
</div>
</div>
1条答案
按热度按时间ygya80vv1#
通过在
.gallery
和.gallery .column:last-child
选择器上设置justify-content: flex-end
和align-items: flex-end
,绿色边框框将与容器的右下角对齐。示例: