img {
width: 100%;
height: 300px;
object-fit: cover;
object-position: top center;
}
qq5c322e67bf4c9 ©著作权
img {
width: 100%;
height: 300px;
object-fit: cover;
object-position: top center;
}
下一篇:CSS - 设置自动等比例缩放
Object.fromEntries()方法是Object.entries()的逆操作,用于将一个键值对数组转为对象。
image之object-fit作用
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M