我用flexbox完成了这项工作。我可以根据需要对齐底部内容,但顶部内容会对齐顶部,但不会左右对齐。我认为使用
justify-content: space-between;
会给它点颜色。我也试过推杆。社交div
margin-left: auto;
.boxes {
background-size: cover;
background-position: center center;
display: flex;
align-items: flex-end;
background-color: red;
width: 50%;
}
.branding {
display: flex;
align-items: flex-start;
justify-content: space-between;
height: 200px;
}
<div class="boxes">
<div class="branding">
<div class="logo">logo</div>
<div class="social">social</div>
</div>
<div>
<h2>Case Study Title</h2>
<p>A catchy description for our case study. We worked hard.</p>
</div>
</div>
-谢谢