1.方法一
.bannerImgfirst {
box-sizing: border-box;
width: 100%;
height: 80px;
position: relative;
overflow: hidden;
.centerImg{
position: absolute;
margin: auto;
top: -9999px;
right: -9999px;
bottom: -9999px;
left: -9999px;
width:100%;
}
}
2.方法二
height: 180px;
width: 100%;
object-fit: cover;