固定好盒子的宽度,高度随传过来的图片大小决定
html
<div class="tab-con">
<img
:src="concertInfo.detail"
alt=""
>
</div>
css
.tab-con {
margin-bottom: 20px;
width: 700px;
img {
width: 700px;
height: auto;
object-fit: contain;
}
}