使用 object-fit: cover
.img-box {
height: 210px;
width: 210px;
border-radius: 8px;
overflow: hidden;
> img {
height: 100%;
width: 100%;
object-fit: cover;
}
}
使用 object-fit: cover
.img-box {
height: 210px;
width: 210px;
border-radius: 8px;
overflow: hidden;
> img {
height: 100%;
width: 100%;
object-fit: cover;
}
}