<div class="container"><img src=""/></div>
.container{width:400px;height:400px;}img{width:100%;height:100%;object-fit:contain}
图片设置宽高百分百,object-fit为contain即可
时间:2024-02-02 14:08:16
<div class="container"><img src=""/></div>
.container{width:400px;height:400px;}img{width:100%;height:100%;object-fit:contain}
图片设置宽高百分百,object-fit为contain即可