1.使用display:table和display:table-cell
<div class="parent">
<p class="son">我要占C位!!! </p>
</div>
.parent {
display: table;
width: 300px;
height: 300px;
text-align: center;
}
.son {
display: table-cell;
height: 200px;
background-color: yellow;
vertical-align: middle;
}
···