为什么添加图像会导致我的“项目”部分的垂直居中?例如,在“薪点”部分中,文本在顶部对齐,但是如果我删除图像,则它就在中间,这是我希望的样子。
.parent { display: table; }
.child {
display: table-cell;
vertical-align: middle;
}
.slide {
width:100%;
height:100%;
position: relative;
z-index: 0;
overflow: hidden;
}
<section class="slide parent" >
<div class="row child">
<div class="large-6 columns">
<img src="img/pfemu1.png"></div>
<div class="large-6 columns">
<h2>PayPoint</h2>
<p>A patient payment solution built around the provider workflow, from the ground up.</p>
<a href="pfe.html"> VIEW CASE STUDY →</a>
</div>
</div>
</div>
</section>