background-image是属性,不是块元素的内容,是无法撑开高度的。要想实现这种效果,一般通过:after,:before来填充。
.teamDiv{ background: url(/image/home_team.jpg); background-repeat:no-repeat; background-size:100% 100%; background-position-x: center; margin: 0 auto; } .teamDiv::after{ content: ""; display: block; padding-bottom: 36%; }
<div class=" teamDiv" > <div class="teamContent">